优化单据编辑接口的逻辑
This commit is contained in:
parent
0d57a8ba33
commit
5072d6e140
@ -106,10 +106,6 @@ public interface DepotHeadMapperEx {
|
||||
* 新增单据主表信息,并反显单据主表id
|
||||
* */
|
||||
int adddepotHead(DepotHead depotHead);
|
||||
/**
|
||||
* 更新单据主表信息
|
||||
* */
|
||||
void updatedepotHead(DepotHead depotHead);
|
||||
|
||||
void updateBuildOnlyNumber();
|
||||
/**
|
||||
|
||||
@ -542,7 +542,7 @@ public class DepotHeadService {
|
||||
depotHead.setOperpersonname(userInfo==null?null:userInfo.getUsername());
|
||||
depotHead.setOpertime(new Timestamp(System.currentTimeMillis()));
|
||||
try{
|
||||
depotHeadMapperEx.updatedepotHead(depotHead);
|
||||
depotHeadMapper.updateByPrimaryKeySelective(depotHead);
|
||||
}catch(Exception e){
|
||||
JshException.writeFail(logger, e);
|
||||
}
|
||||
|
||||
@ -347,93 +347,6 @@
|
||||
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
|
||||
#{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<update id="updatedepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHead">
|
||||
update jsh_depothead
|
||||
<set>
|
||||
<if test="type != null">
|
||||
Type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="subtype != null">
|
||||
SubType = #{subtype,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectid != null">
|
||||
ProjectId = #{projectid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="defaultnumber != null">
|
||||
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
Number = #{number,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operpersonname != null">
|
||||
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="opertime != null">
|
||||
OperTime = #{opertime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="organid != null">
|
||||
OrganId = #{organid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="handspersonid != null">
|
||||
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="accountid != null">
|
||||
AccountId = #{accountid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="changeamount != null">
|
||||
ChangeAmount = #{changeamount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="allocationprojectid != null">
|
||||
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="totalprice != null">
|
||||
TotalPrice = #{totalprice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="paytype != null">
|
||||
PayType = #{paytype,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
Remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesman != null">
|
||||
Salesman = #{salesman,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="accountidlist != null">
|
||||
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="accountmoneylist != null">
|
||||
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discount != null">
|
||||
Discount = #{discount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="discountmoney != null">
|
||||
DiscountMoney = #{discountmoney,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="discountlastmoney != null">
|
||||
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="othermoney != null">
|
||||
OtherMoney = #{othermoney,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="othermoneylist != null">
|
||||
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="othermoneyitem != null">
|
||||
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="accountday != null">
|
||||
AccountDay = #{accountday,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
Status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="linknumber != null">
|
||||
LinkNumber = #{linknumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateBuildOnlyNumber">
|
||||
update jsh_sequence set current_val = current_val + 1 where seq_name = 'depot_number_seq'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user