ソースを参照

优化diamante

Your Name 2 年 前
コミット
53faf4da7e

+ 73 - 32
java110-bean/src/main/java/com/java110/dto/purchase/AssetInventoryDto.java

@@ -16,17 +16,17 @@ import java.util.Date;
 public class AssetInventoryDto extends PageDto implements Serializable {
 
     private String code;
-private String shId;
-private String remark;
-private String aiId;
-private String invTime;
-private String name;
-private String staffName;
-private String shName;
-private String state;
-private String stateName;
-private String communityId;
-private String staffId;
+    private String shId;
+    private String remark;
+    private String aiId;
+    private String invTime;
+    private String name;
+    private String staffName;
+    private String shName;
+    private String state;
+    private String stateName;
+    private String communityId;
+    private String staffId;
     private String opinion;
     private String auditId;
     private String auditName;
@@ -34,73 +34,98 @@ private String staffId;
     private String auditTime;
     private Date createTime;
 
+    private String storeId;
+
     private String statusCd = "0";
 
+    private String resId;
+
 
     public String getCode() {
         return code;
     }
-public void setCode(String code) {
+
+    public void setCode(String code) {
         this.code = code;
     }
-public String getShId() {
+
+    public String getShId() {
         return shId;
     }
-public void setShId(String shId) {
+
+    public void setShId(String shId) {
         this.shId = shId;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getAiId() {
+
+    public String getAiId() {
         return aiId;
     }
-public void setAiId(String aiId) {
+
+    public void setAiId(String aiId) {
         this.aiId = aiId;
     }
-public String getInvTime() {
+
+    public String getInvTime() {
         return invTime;
     }
-public void setInvTime(String invTime) {
+
+    public void setInvTime(String invTime) {
         this.invTime = invTime;
     }
-public String getName() {
+
+    public String getName() {
         return name;
     }
-public void setName(String name) {
+
+    public void setName(String name) {
         this.name = name;
     }
-public String getStaffName() {
+
+    public String getStaffName() {
         return staffName;
     }
-public void setStaffName(String staffName) {
+
+    public void setStaffName(String staffName) {
         this.staffName = staffName;
     }
-public String getShName() {
+
+    public String getShName() {
         return shName;
     }
-public void setShName(String shName) {
+
+    public void setShName(String shName) {
         this.shName = shName;
     }
-public String getState() {
+
+    public String getState() {
         return state;
     }
-public void setState(String state) {
+
+    public void setState(String state) {
         this.state = state;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getStaffId() {
+
+    public String getStaffId() {
         return staffId;
     }
-public void setStaffId(String staffId) {
+
+    public void setStaffId(String staffId) {
         this.staffId = staffId;
     }
 
@@ -167,4 +192,20 @@ public void setStaffId(String staffId) {
     public void setAuditTime(String auditTime) {
         this.auditTime = auditTime;
     }
+
+    public String getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+
+    public String getResId() {
+        return resId;
+    }
+
+    public void setResId(String resId) {
+        this.resId = resId;
+    }
 }

+ 1 - 4
java110-db/src/main/resources/mapper/common/MachineRecordServiceDaoImplMapper.xml

@@ -221,11 +221,8 @@
     <!-- 查询设备上报数量 add by wuxw 2018-07-03 -->
     <select id="queryMachineRecordsCount" parameterType="Map" resultType="Map">
         select count(1) count
-        from machine_record t,t_dict td1
+        from machine_record t
         where 1 =1
-        and t.open_type_cd = td1.status_cd
-        and td1.table_name = 'machine_record'
-        and td1.table_columns = 'open_type_cd'
         <if test="fileTime !=null and fileTime != ''">
             and t.file_time= #{fileTime}
         </if>

+ 12 - 0
java110-db/src/main/resources/mapper/store/AssetInventoryV1ServiceDaoImplMapper.xml

@@ -21,9 +21,15 @@
         staffId,td1.`name` stateName,t.opinion,t.audit_id,t.audit_id auditId,t.audit_name,t.audit_name
         auditName,t.audit_tel,t.audit_tel auditTel,t.audit_time,t.audit_time auditTime
         from asset_inventory t
+        <if test="resId != null and resId != ''">
+            left join asset_inventory_detail aid on t.ai_id = aid.apply_order_id and aid.status_cd = '0'
+        </if>
         LEFT JOIN t_dict td1 on t.state = td1.status_cd and td1.table_name = 'asset_inventory' and td1.table_columns =
         'state'
         where 1 =1
+        <if test="resId !=null and resId != ''">
+            and aid.res_id= #{resId}
+        </if>
         <if test="auditId !=null and auditId != ''">
             and t.audit_id= #{auditId}
         </if>
@@ -147,7 +153,13 @@
     <select id="queryAssetInventorysCount" parameterType="Map" resultType="Map">
         select count(1) count
         from asset_inventory t
+        <if test="resId != null and resId != ''">
+            left join asset_inventory_detail aid on t.ai_id = aid.apply_order_id and aid.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="resId !=null and resId != ''">
+            and aid.res_id= #{resId}
+        </if>
         <if test="auditId !=null and auditId != ''">
             and t.audit_id= #{auditId}
         </if>

+ 3 - 3
service-job/src/main/java/com/java110/job/msgNotify/ali/AliMsgNotifyImpl.java

@@ -187,7 +187,7 @@ public class AliMsgNotifyImpl implements IMsgNotify {
         String accessSecret = CommunitySettingFactory.getValue(communityId, "ALI_ACCESS_SECRET");
         String region = CommunitySettingFactory.getValue(communityId, "ALI_REGION");
         String signName = CommunitySettingFactory.getValue(communityId, "ALI_SIGN_NAME");
-        String templateCode = CommunitySettingFactory.getValue(communityId, "ALI_OWE_TEMPLATE_CODE");
+        String templateCode = CommunitySettingFactory.getValue(communityId, "ALI_REPAIR_TEMPLATE_CODE");
         DefaultProfile profile = DefaultProfile.getProfile(region,
                 accessKeyId,
                 accessSecret);
@@ -257,7 +257,7 @@ public class AliMsgNotifyImpl implements IMsgNotify {
         String accessSecret = CommunitySettingFactory.getValue(communityId, "ALI_ACCESS_SECRET");
         String region = CommunitySettingFactory.getValue(communityId, "ALI_REGION");
         String signName = CommunitySettingFactory.getValue(communityId, "ALI_SIGN_NAME");
-        String templateCode = CommunitySettingFactory.getValue(communityId, "ALI_OWE_TEMPLATE_CODE");
+        String templateCode = CommunitySettingFactory.getValue(communityId, "ALI_REPAIR_TEMPLATE_CODE");
         DefaultProfile profile = DefaultProfile.getProfile(region,
                 accessKeyId,
                 accessSecret);
@@ -336,7 +336,7 @@ public class AliMsgNotifyImpl implements IMsgNotify {
         String accessSecret = CommunitySettingFactory.getValue(communityId, "ALI_ACCESS_SECRET");
         String region = CommunitySettingFactory.getValue(communityId, "ALI_REGION");
         String signName = CommunitySettingFactory.getValue(communityId, "ALI_SIGN_NAME");
-        String templateCode = CommunitySettingFactory.getValue(communityId, "ALI_OWE_TEMPLATE_CODE");
+        String templateCode = CommunitySettingFactory.getValue(communityId, "ALI_REPAIR_TEMPLATE_CODE");
         DefaultProfile profile = DefaultProfile.getProfile(region,
                 accessKeyId,
                 accessSecret);

+ 15 - 13
service-store/src/main/java/com/java110/store/cmd/assetInventory/ListAssetInventoryCmd.java

@@ -17,6 +17,7 @@ package com.java110.store.cmd.assetInventory;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.CmdContextUtils;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
@@ -48,12 +49,11 @@ import java.util.List;
 @Java110Cmd(serviceCode = "assetInventory.listAssetInventory")
 public class ListAssetInventoryCmd extends Cmd {
 
-  private static Logger logger = LoggerFactory.getLogger(ListAssetInventoryCmd.class);
+    private static Logger logger = LoggerFactory.getLogger(ListAssetInventoryCmd.class);
     @Autowired
     private IAssetInventoryV1InnerServiceSMO assetInventoryV1InnerServiceSMOImpl;
 
 
-
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         super.validatePageInfo(reqJson);
@@ -62,23 +62,25 @@ public class ListAssetInventoryCmd extends Cmd {
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
 
-           AssetInventoryDto assetInventoryDto = BeanConvertUtil.covertBean(reqJson, AssetInventoryDto.class);
+        String storeId = CmdContextUtils.getStoreId(cmdDataFlowContext);
 
-           int count = assetInventoryV1InnerServiceSMOImpl.queryAssetInventorysCount(assetInventoryDto);
+        AssetInventoryDto assetInventoryDto = BeanConvertUtil.covertBean(reqJson, AssetInventoryDto.class);
+        assetInventoryDto.setStoreId(storeId);
+        int count = assetInventoryV1InnerServiceSMOImpl.queryAssetInventorysCount(assetInventoryDto);
 
-           List<AssetInventoryDto> assetInventoryDtos = null;
+        List<AssetInventoryDto> assetInventoryDtos = null;
 
 
-           if (count > 0) {
-               assetInventoryDtos = assetInventoryV1InnerServiceSMOImpl.queryAssetInventorys(assetInventoryDto);
-           } else {
-               assetInventoryDtos = new ArrayList<>();
-           }
+        if (count > 0) {
+            assetInventoryDtos = assetInventoryV1InnerServiceSMOImpl.queryAssetInventorys(assetInventoryDto);
+        } else {
+            assetInventoryDtos = new ArrayList<>();
+        }
 
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, assetInventoryDtos);
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, assetInventoryDtos);
 
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 
-           cmdDataFlowContext.setResponseEntity(responseEntity);
+        cmdDataFlowContext.setResponseEntity(responseEntity);
     }
 }