Browse Source

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper into master

seyason 11 months ago
parent
commit
33d7f9055f

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -9187,7 +9187,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 reportMapper.denyReportWithUserAndCreateDate(String.valueOf(e.get("userId")),String.valueOf(e.get("createDate")));
                 //发送企业微信消息
                 if(wxCorpInfo!=null&&e.get("corpwxUserId")!=null){
-                    wxCorpInfoService.sendWXCorpMsg(wxCorpInfo,String.valueOf(e.get("corpwxUserId")), "您在"+String.valueOf(e.get("createDate"))+"的日报考勤填报异常,请完成填报变更", null, WxCorpInfoServiceImpl.TEXT_CARD_MSG_REPORT_DENY);
+                    wxCorpInfoService.sendWXCorpMsg(wxCorpInfo,String.valueOf(e.get("corpwxUserId")), "您在"+String.valueOf(e.get("createDate"))+"的日报考勤填报异常,请完成填报变更", null, WxCorpInfoServiceImpl.TEXT_CARD_MSG_REPORT_ABNOEMAL);
                 }
             });
         }

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -95,7 +95,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     public static final int TEXT_CARD_MSG_BUSTRIP_DENY = 2;//出差审核驳回
     public static final int TEXT_CARD_MSG_REPORT_DENY = 10;//日报驳回
     public static final int TEXT_CARD_MSG_REPORT_AGREE = 11; //日报审核通过
-
+    public static final int TEXT_CARD_MSG_REPORT_ABNOEMAL = 12;//日报驳回
     public static final int TEXT_CARD_MSG_EXPENSE_AGREE = 21;//费用报销审核通过
     public static final int TEXT_CARD_MSG_EXPENSE_DENY = 22;//费用报销审核驳回
 
@@ -297,6 +297,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     title = "日报驳回";
                 } else if (msgType.equals(TEXT_CARD_MSG_REPORT_AGREE)) {
                     title = "日报审核通过";
+                }else if (msgType.equals(TEXT_CARD_MSG_REPORT_ABNOEMAL)) {
+                    title = "异常提醒";
                 }
             } else {
                 jumpUrl = jumpUrl.replace("STATE", pageRouter);

+ 5 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/PlanController.java

@@ -125,6 +125,11 @@ public class PlanController {
         return planService.receivePlan(ids);
     }
 
+    @RequestMapping("/unReceivePlan")
+    public HttpRespMsg unReceivePlan(String ids){
+        return planService.unReceivePlan(ids);
+    }
+
     @RequestMapping("/cancellationReceive")
     public HttpRespMsg cancellationReceive(Integer id){
         return planService.cancellationReceive(id);

+ 2 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/PlanService.java

@@ -58,4 +58,6 @@ public interface PlanService extends IService<Plan> {
     HttpRespMsg deletePlan(Integer id);
 
     HttpRespMsg allocationUser(Integer planId);
+
+    HttpRespMsg unReceivePlan(String ids);
 }

+ 14 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java

@@ -1183,6 +1183,20 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
         return msg;
     }
 
+    @Override
+    public HttpRespMsg unReceivePlan(String ids) {
+        HttpRespMsg msg=new HttpRespMsg();
+        if(StringUtils.isEmpty(ids)){
+            return msg;
+        }
+        List<String> idList =new ArrayList<>(Arrays.asList(ids.split(",")));
+        idList.add("-1");
+        if(!prodProcedureTeamService.removeByIds(idList)){
+            msg.setError("验证失败");
+        }
+        return msg;
+    }
+
     @Override
     public HttpRespMsg deletePeople(Integer id) {
         HttpRespMsg msg=new HttpRespMsg();

+ 28 - 19
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -277,7 +277,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         planProcedureTotal.setTotalFillTime(workingTime);
         BigDecimal bigDecimal = new BigDecimal(workingTime);
-        bigDecimal=bigDecimal.divide(new BigDecimal(planProcedureTotal.getTotalWorkingHours()));
+        bigDecimal=bigDecimal.divide(new BigDecimal(planProcedureTotal.getTotalWorkingHours()),2,RoundingMode.HALF_UP);
         bigDecimal=bigDecimal.multiply(new BigDecimal(100)).setScale(0,RoundingMode.HALF_UP);
         planProcedureTotal.setTotalProgress(bigDecimal.intValue());
 //            planProcedureTotal.setTotalProgress((int)((workingTime / planProcedureTotal.getTotalWorkingHours()) * 100));
@@ -4754,12 +4754,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         List<Map<String,Object>> reportList=reportMapper.getReportList(startDate,endDate,planId,stateKey,departmentId,companyId);
         List<List<String>> dataList=new ArrayList<>();
 //        String[] title={"员工","工号","所属部门","排除工单号/任务变更通知号","钢印号","工作时长","产品名称","工序名称","进度","质检类型","质检人","工作日期","填报日期"};
-        String[] title={"所属部门","工号","员工","排除工单号/任务变更通知号","钢印号","产品名称","工序名称","进度","工作件数", "工作时长","单价","工价","汇总",
-                "工作日期","填报日期","质检类型","质检人"};
+//        String[] title={"所属部门","工号","员工","排除工单号/任务变更通知号","钢印号","产品名称","工序名称","进度","工作件数", "工作时长","单价","工价","汇总",
+//                "工作日期","填报日期","质检类型","质检人"};
+        String[] title={"工位名称","项目名称","包名称","生产订单号","工序名称","零件编码","零件名称","零件图号","生产数量", "工时","单价","合计",
+                "作业人员","日期"};
         List<String> titleList=Arrays.asList(title);
         dataList.add(titleList);
 
-        int sumCostIndex = 12;
+        int sumCostIndex = 11;
         List<String> sumLine = null;
         String lastJobNum = null;
         for (Map<String, Object> map : reportList) {
@@ -4767,27 +4769,34 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             String departmentName = convertDepartmentIdToCascade(Integer.valueOf(String.valueOf(map.get("departmentId"))), departmentList);
             item.add(departmentName);
             String curJobBNum = String.valueOf(map.get("jobNumber"));
-            item.add(curJobBNum);
-            item.add(String.valueOf(map.get("userName")));
-            Integer planType = Integer.valueOf(String.valueOf(map.get("planType")));
-            if(planType==0){
-                item.add(map.get("productSchedulingNum")==null?"":String.valueOf(map.get("productSchedulingNum")));
-            }else {
-                item.add(map.get("taskChangeNoticeNum")==null?"":String.valueOf(map.get("taskChangeNoticeNum")));
-            }
-            item.add(map.get("steelNumArray")==null?"":String.valueOf(map.get("steelNumArray")));
-            item.add(String.valueOf(map.get("productName")));
+//            item.add(curJobBNum);
+//            item.add(String.valueOf(map.get("userName")));
+//            Integer planType = Integer.valueOf(String.valueOf(map.get("planType")));
+//            if(planType==0){
+//                item.add(map.get("productSchedulingNum")==null?"":String.valueOf(map.get("productSchedulingNum")));
+//            }else {
+//                item.add(map.get("taskChangeNoticeNum")==null?"":String.valueOf(map.get("taskChangeNoticeNum")));
+//            }
+//            item.add(map.get("steelNumArray")==null?"":String.valueOf(map.get("steelNumArray")));
+            item.add(map.get("projectName")==null?"":String.valueOf(map.get("projectName")));
+//            item.add(String.valueOf(map.get("productName")));
+            item.add("");
+            item.add(map.get("productOrderNum")==null?"":String.valueOf(map.get("productOrderNum")));
             item.add(String.valueOf(map.get("procedureName")));
-            item.add(String.valueOf(map.get("progress"))+"%");
+            item.add("");
+            item.add("");
+            item.add("");
+//            item.add(String.valueOf(map.get("progress"))+"%");
             item.add(String.valueOf(map.get("finishNum")));
             item.add(String.valueOf(map.get("workingTime")));
             item.add(String.valueOf(map.get("unitPrice")));
             String cost = String.valueOf(map.get("cost"));
-            item.add(cost);
+//            item.add(cost);
+            item.add(String.valueOf(map.get("userName")));
             item.add(String.valueOf(map.get("createDate")));
-            item.add(String.valueOf(map.get("reportTime")));
-            item.add(String.valueOf(map.get("checkType")));
-            item.add(map.get("checkerName")==null?"":String.valueOf(map.get("checkerName")));
+//            item.add(String.valueOf(map.get("reportTime")));
+//            item.add(String.valueOf(map.get("checkType")));
+//            item.add(map.get("checkerName")==null?"":String.valueOf(map.get("checkerName")));
             dataList.add(item);
             if (lastJobNum == null || !lastJobNum.equals(curJobBNum)) {
                 //换新的人了

+ 1 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ReportMapper.xml

@@ -453,7 +453,7 @@
         ) as total
     </select>
     <select id="getReportList" resultType="java.util.Map">
-        select p.plan_type as planType,u.name as userName,u.job_number as jobNumber,d.department_id as departmentId,p.product_scheduling_num as productSchedulingNum,
+        select p.project_name as projectName,p.product_order_num as productOrderNum, p.plan_type as planType,u.name as userName,u.job_number as jobNumber,d.department_id as departmentId,p.product_scheduling_num as productSchedulingNum,
         p.task_change_notice_num as taskChangeNoticeNum,r.steel_num_array as steelNumArray,r.working_time as workingTime,p.product_name as productName,r.finish_num as finishNum,
         pp.name as procedureName,r.progress as progress,(CASE r.check_type WHEN 0 THEN '自检' WHEN 1 THEN '互检' ELSE '专检' END ) as checkType ,uu.name as checkerName,
         date_format(r.create_date,'%Y-%m-%d') as createDate,date_format(r.create_time,'%Y-%m-%d %T') as reportTime, pp.unit_price as unitPrice,r.cost  from report r

+ 36 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue

@@ -10,7 +10,7 @@
     <div class="distribution_con contentRoll">
       <div class="distribution_box" v-for="item,index in distributionList" :key="index">
         <div class="distribution_ItemBom">
-          <van-checkbox v-if="todayAndTomorrow" :disabled="item.checkboxDisabled"  v-model="item.prodProcedure.isSelected"  @click="itemChecked" shape="square">
+          <van-checkbox v-if="todayAndTomorrow" :disabled="item.checkboxDisabled  || item.teamNames.indexOf(user.name) == -1"  v-model="item.prodProcedure.isSelected"  @click="itemChecked" shape="square">
           </van-checkbox>
           <div class="PlanItem">
             <span>{{ item.prodProcedure.name }}</span>
@@ -73,6 +73,7 @@
         <van-checkbox v-model="isAllChecked" :disabled="distributionList.length == 0" @click="allChecked" shape="square" style="padding-left:3vw"></van-checkbox>
         <div style="padding:1vh 2vw">
         <van-button @click="batchReceive()" :disabled="!isCanAgree || distributionList.length == 0" type="info" size="small">批量接收</van-button>
+        <van-button @click="batchUnReceive()" :disabled="!isCanAgree || distributionList.length == 0" type="info" size="small">批量拒收</van-button>
         <!-- <van-button @click="cancellationReceiveBatch()" :disabled="!isCanAgree || distributionList.length == 0" type="info" size="small">批量取消接收</van-button> -->
         <!-- <van-button @click="batchAgree(false)" :disabled="!isCanAgree || distributionList.length == 0" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button> -->
         </div>
@@ -237,6 +238,40 @@ export default {
             }).catch(err => { this.$toast.clear(); })
         }
     },
+    batchUnReceive(bol){
+        let ids = ''
+        console.log(this.user)
+        let resArr=  this.distributionList.map(item=>{
+          if(item.prodProcedure.isSelected){
+            if(item.prodProcedureTeamList.filter(i=>i.userId==this.user.id).length>0){
+               return item.prodProcedureTeamList.filter(i=>i.userId==this.user.id)[0].id
+            }else{
+              return "-1"
+            }
+          }
+         })
+         console.log('res===============',resArr)
+         ids = resArr.join(",").trim()
+        if(resArr.length > 0){
+            this.$axios.post(
+              "/plan/unReceivePlan",
+              {
+                ids:ids
+              }
+            ).then(res => {
+              if (res.code === "ok") {
+                this.isAllChecked=false
+                this.isCanAgree=false
+                this.getDistributionList()
+                this.$toast.success('拒收成功');
+              } else {
+                this.$toast.clear();
+                console.log("bbb")
+                this.$toast.fail(res.msg);
+              }
+            }).catch(err => { this.$toast.clear(); })
+        }
+    },
     workShowHide(index) {
       this.distributionList[index].flg = !this.distributionList[index].flg;
       console.log('=========>',this.distributionList[index].flg)