Pārlūkot izejas kodu

优化 store-id 为空问题

Your Name 3 gadi atpakaļ
vecāks
revīzija
3576ebb3ab

+ 19 - 1
java110-bean/src/main/java/com/java110/dto/itemRelease/ItemReleaseDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.itemRelease;
 
 import com.java110.dto.PageDto;
+import com.java110.dto.itemReleaseType.ItemReleaseTypeDto;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -13,7 +14,14 @@ import java.util.Date;
  * @Version 1.0
  * add by wuxw 2019/4/24
  **/
-public class ItemReleaseDto extends PageDto implements Serializable {
+public class ItemReleaseDto extends ItemReleaseTypeDto implements Serializable {
+
+    //状态 W待审核 D 审核中 C 审核完成 D 审核失败
+    public static final String STATE_WAIT = "W"; //W待审核
+    public static final String STATE_DOING = "D"; //审核中
+    public static final String STATE_COMPLETE = "C"; //审核完成
+    public static final String STATE_FAIT = "W"; //审核失败
+
 
     private String amount;
     private String applyCompany;
@@ -28,6 +36,8 @@ public class ItemReleaseDto extends PageDto implements Serializable {
     private String state;
     private String communityId;
 
+    private String stateName;
+
 
     private Date createTime;
 
@@ -146,4 +156,12 @@ public class ItemReleaseDto extends PageDto implements Serializable {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getStateName() {
+        return stateName;
+    }
+
+    public void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
 }

+ 7 - 1
java110-db/src/main/resources/mapper/common/ItemReleaseV1ServiceDaoImplMapper.xml

@@ -18,8 +18,12 @@
         select t.apply_company,t.apply_company applyCompany,t.id_card,t.id_card idCard,t.pass_time,t.pass_time
         passTime,t.car_num,t.car_num carNum,t.remark,t.status_cd,t.status_cd statusCd,t.apply_person,t.apply_person
         applyPerson,t.ir_id,t.ir_id irId,t.apply_tel,t.apply_tel applyTel,t.type_id,t.type_id
-        typeId,t.state,t.community_id,t.community_id communityId
+        typeId,t.state,t.community_id,t.community_id communityId,irt.type_name typeName,irt.flow_id flowId,irt.flow_name flowName,
+        td.name stateName,t.create_time createTime,SUM(irr.amount) amount
         from item_release t
+        LEFT JOIN item_release_type irt on t.type_id = irt.type_id and irt.status_cd = '0' and irt.community_id = t.community_id
+        left join t_dict td on t.state = td.status_cd and td.table_name = 'item_release' and td.table_columns = 'state'
+        left join item_release_res irr on t.ir_id = irr.ir_id and t.community_id = irr.community_id and irr.status_cd = '0'
         where 1 =1
         <if test="applyCompany !=null and applyCompany != ''">
             and t.apply_company= #{applyCompany}
@@ -57,6 +61,8 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
+        group by t.create_time,t.apply_company,t.id_card,t.pass_time,t.car_num,t.remark,t.status_cd,t.apply_person,t.ir_id,t.apply_tel,t.type_id,t.state,t.community_id,irt.type_name,irt.flow_id ,irt.flow_name,
+        td.name
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}

+ 7 - 0
service-common/src/main/java/com/java110/common/cmd/itemRelease/ListItemReleaseCmd.java

@@ -23,6 +23,7 @@ import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.doc.annotation.*;
+import com.java110.intf.common.IItemReleaseResV1InnerServiceSMO;
 import com.java110.intf.common.IItemReleaseV1InnerServiceSMO;
 import com.java110.po.itemRelease.ItemReleasePo;
 import com.java110.utils.exception.CmdException;
@@ -82,6 +83,9 @@ public class ListItemReleaseCmd extends Cmd {
     @Autowired
     private IItemReleaseV1InnerServiceSMO itemReleaseV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IItemReleaseResV1InnerServiceSMO itemReleaseResV1InnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         super.validatePageInfo(reqJson);
@@ -99,6 +103,7 @@ public class ListItemReleaseCmd extends Cmd {
 
            if (count > 0) {
                itemReleaseDtos = itemReleaseV1InnerServiceSMOImpl.queryItemReleases(itemReleaseDto);
+
            } else {
                itemReleaseDtos = new ArrayList<>();
            }
@@ -109,4 +114,6 @@ public class ListItemReleaseCmd extends Cmd {
 
            cmdDataFlowContext.setResponseEntity(responseEntity);
     }
+
+
 }

+ 2 - 0
service-common/src/main/java/com/java110/common/cmd/itemRelease/SaveItemReleaseCmd.java

@@ -24,6 +24,7 @@ import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.doc.annotation.*;
+import com.java110.dto.itemRelease.ItemReleaseDto;
 import com.java110.dto.itemReleaseType.ItemReleaseTypeDto;
 import com.java110.dto.oaWorkflow.OaWorkflowDto;
 import com.java110.dto.user.UserDto;
@@ -191,6 +192,7 @@ public class SaveItemReleaseCmd extends Cmd {
 
         ItemReleasePo itemReleasePo = BeanConvertUtil.covertBean(reqJson, ItemReleasePo.class);
         itemReleasePo.setIrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        itemReleasePo.setState(ItemReleaseDto.STATE_WAIT);
         int flag = itemReleaseV1InnerServiceSMOImpl.saveItemRelease(itemReleasePo);
 
         if (flag < 1) {