wuxw 2 lat temu
rodzic
commit
3a4829d18c

+ 8 - 6
java110-db/src/main/resources/mapper/acct/InvoiceApplyItemV1ServiceDaoImplMapper.xml

@@ -73,9 +73,7 @@
         <if test="newBId != null and newBId != ''">
             ,t.b_id = #{newBId}
         </if>
-        <if test="itemId !=null and itemId != ''">
-            , t.item_id= #{itemId}
-        </if>
+
         <if test="itemType !=null and itemType != ''">
             , t.item_type= #{itemType}
         </if>
@@ -91,13 +89,17 @@
         <if test="remark !=null and remark != ''">
             , t.remark= #{remark}
         </if>
-        <if test="communityId !=null and communityId != ''">
-            , t.community_id= #{communityId}
-        </if>
+
         where 1=1
         <if test="applyId !=null and applyId != ''">
             and t.apply_id= #{applyId}
         </if>
+        <if test="itemId !=null and itemId != ''">
+            and t.item_id= #{itemId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
     </update>
 

+ 10 - 0
service-acct/src/main/java/com/java110/acct/cmd/invoice/DeleteInvoiceApplyCmd.java

@@ -21,8 +21,10 @@ import com.java110.core.annotation.Java110Transactional;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.acct.IInvoiceApplyItemV1InnerServiceSMO;
 import com.java110.intf.acct.IInvoiceApplyV1InnerServiceSMO;
 import com.java110.po.invoiceApply.InvoiceApplyPo;
+import com.java110.po.invoiceApplyItem.InvoiceApplyItemPo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
@@ -48,6 +50,9 @@ public class DeleteInvoiceApplyCmd extends Cmd {
     @Autowired
     private IInvoiceApplyV1InnerServiceSMO invoiceApplyV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IInvoiceApplyItemV1InnerServiceSMO invoiceApplyItemV1InnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "applyId", "applyId不能为空");
@@ -66,6 +71,11 @@ public class DeleteInvoiceApplyCmd extends Cmd {
             throw new CmdException("删除数据失败");
         }
 
+        //todo 删除 申请项
+        InvoiceApplyItemPo invoiceApplyItemPo = new InvoiceApplyItemPo();
+        invoiceApplyItemPo.setApplyId(invoiceApplyPo.getApplyId());
+        invoiceApplyItemV1InnerServiceSMOImpl.deleteInvoiceApplyItem(invoiceApplyItemPo);
+
         cmdDataFlowContext.setResponseEntity(ResultVo.success());
     }
 }