wuxw hai 1 ano
pai
achega
770918e579

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/work/WorkPoolDto.java

@@ -35,6 +35,7 @@ public class WorkPoolDto extends PageDto implements Serializable {
     private String startTime;
     private String endTime;
     private String state;
+    private String[] states;
 
     private String stateName;
 
@@ -372,4 +373,12 @@ public class WorkPoolDto extends PageDto implements Serializable {
     public void setDeduction(String deduction) {
         this.deduction = deduction;
     }
+
+    public String[] getStates() {
+        return states;
+    }
+
+    public void setStates(String[] states) {
+        this.states = states;
+    }
 }

+ 12 - 1
java110-db/src/main/resources/mapper/oa/WorkPoolV1ServiceDaoImplMapper.xml

@@ -230,6 +230,12 @@
         <if test="wtId !=null and wtId != ''">
             and t.wt_id= #{wtId}
         </if>
+        <if test="states != null">
+            and t.state in
+            <foreach collection="states" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
 
         <if test="queryStartTime !=null and queryStartTime !=''">
             and wtk.create_time &gt;= #{queryStartTime}
@@ -289,7 +295,12 @@
         <if test="wtId !=null and wtId != ''">
             and t.wt_id= #{wtId}
         </if>
-
+        <if test="states != null">
+            and t.state in
+            <foreach collection="states" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="queryStartTime !=null and queryStartTime !=''">
             and wtk.create_time &gt;= #{queryStartTime}
         </if>

+ 4 - 2
service-oa/src/main/java/com/java110/oa/cmd/work/FinishWorkCopyCmd.java

@@ -85,14 +85,16 @@ public class FinishWorkCopyCmd extends Cmd {
 
         Assert.listOnlyOne(userDtos, "用户不存在");
         String deductionMoney = "0.00";
-        if (reqJson.containsKey("deductionMoney") && StringUtil.isEmpty(reqJson.getString("deductionMoney"))) {
+        String deductionReason = reqJson.getString("deductionReason");
+        if (reqJson.containsKey("deductionMoney") && !StringUtil.isEmpty(reqJson.getString("deductionMoney"))) {
             deductionMoney = reqJson.getString("deductionMoney");
+            deductionReason += (" 扣款 " + deductionMoney + "元");
         }
 
         WorkTaskItemPo workTaskItemPo = new WorkTaskItemPo();
         workTaskItemPo.setItemId(reqJson.getString("itemId"));
         workTaskItemPo.setDeductionMoney(deductionMoney);
-        workTaskItemPo.setDeductionReason(reqJson.getString("deductionReason"));
+        workTaskItemPo.setDeductionReason(deductionReason);
         workTaskItemPo.setDeductionPersonId(userDtos.get(0).getUserId());
         workTaskItemPo.setDeductionPersonName(userDtos.get(0).getName());
         workTaskItemPo.setState(WorkTaskItemDto.STATE_COPY_COMPLETE);

+ 6 - 0
service-oa/src/main/java/com/java110/oa/cmd/work/QueryTaskWorkCmd.java

@@ -13,6 +13,7 @@ import com.java110.intf.oa.*;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.ListUtil;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -41,6 +42,11 @@ public class QueryTaskWorkCmd extends Cmd {
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
         WorkPoolDto workPoolDto = BeanConvertUtil.covertBean(reqJson, WorkPoolDto.class);
+        if(!StringUtil.isEmpty(workPoolDto.getState()) && workPoolDto.getState().contains(",")){
+
+            workPoolDto.setStates(workPoolDto.getState().split(","));
+            workPoolDto.setState("");
+        }
         String userId = CmdContextUtils.getUserId(context);
         workPoolDto.setStaffId(userId);
         int count = workPoolV1InnerServiceSMOImpl.queryTaskWorkPoolsCount(workPoolDto);

+ 6 - 6
service-oa/src/main/java/com/java110/oa/cmd/work/SaveWorkPoolCmd.java

@@ -104,12 +104,12 @@ public class SaveWorkPoolCmd extends Cmd {
      */
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-        Assert.hasKeyAndValue(reqJson, "wtId", "请求报文中未包含wtId");
-        Assert.hasKeyAndValue(reqJson, "workName", "请求报文中未包含workName");
-        Assert.hasKeyAndValue(reqJson, "workCycle", "请求报文中未包含workCycle");
-        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
-        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区");
+        Assert.hasKeyAndValue(reqJson, "wtId", "请求报文中未包含工作类型");
+        Assert.hasKeyAndValue(reqJson, "workName", "请求报文中未包含标题");
+        Assert.hasKeyAndValue(reqJson, "workCycle", "请求报文中未包含工单标识");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含开始时间");
+        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含完成时间");
         String storeId = CmdContextUtils.getStoreId(cmdDataFlowContext);
         reqJson.put("storeId", storeId);
         if (!reqJson.containsKey("staffs")) {