Min 1 rok temu
rodzic
commit
c557a9be97

+ 3 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -11,6 +11,7 @@ import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
 import com.management.platform.util.UserAgentUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.junit.Test;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -272,6 +273,8 @@ public class AuthRedirectController {
         String deviceType = UserAgentUtils.getDeviceType(userAgent);
         boolean isMobile = "MOBILE".equals(deviceType);
         WxCorpInfo corpInfo = wxCorpInfoMapper.selectById(corpId);
+        System.out.println("========================ACCESS_TOKEN====================="+wxCorpInfoService.getCorpAgentAccessToken(corpInfo));
+        System.out.println("========================CODE====================="+code);
         String url = WeiXinCorpController.GET_CORP_INSIDE_USERINFO_URL.replace("ACCESS_TOKEN", wxCorpInfoService.getCorpAgentAccessToken(corpInfo)).replace("CODE", code);
         String forObject = this.restTemplate.getForObject(url, String.class);
         JSONObject obj = JSONObject.parseObject(forObject);

+ 3 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/PlanProcedureTotal.java

@@ -71,6 +71,9 @@ public class PlanProcedureTotal extends Model<PlanProcedureTotal> {
     @TableField(exist = false)
     private boolean canReceive;
 
+    @TableField(exist = false)
+    private boolean needAddCircle;
+
     @Override
     protected Serializable pkVal() {
         return this.id;

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

@@ -153,7 +153,7 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
         if(!StringUtils.isEmpty(steelStampNumber)){
             queryWrapper.apply("'"+steelStampNumber+"'"+" between steel_stamp_number_start AND steel_stamp_number_end");
         }
-        queryWrapper.orderByDesc("start_date").orderByDesc("create_time");
+        queryWrapper.orderByDesc("create_time").orderByDesc("start_date");
         IPage<Plan> planIPage = planMapper.selectPage(new Page<>(pageIndex, pageSize), queryWrapper);
         List<Plan> records = planIPage.getRecords();
         List<Integer> ids = records.stream().map(Plan::getProductId).distinct().collect(Collectors.toList());
@@ -828,14 +828,14 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
     @Override
     public HttpRespMsg changePeople(ProdProcedureTeam prodProcedureTeam, String newPeopleId) {
         HttpRespMsg msg=new HttpRespMsg();
-        String time="16:00:00";
-        DateTimeFormatter df=DateTimeFormatter.ofPattern("HH:mm:ss");
-        LocalTime localTime=LocalTime.now();
-        LocalTime timeParse = LocalTime.parse(time, df);
-        if(localTime.isAfter(timeParse)){
-            msg.setError("下午4点之后禁止此操作");
-            return msg;
-        }
+//        String time="16:00:00";
+//        DateTimeFormatter df=DateTimeFormatter.ofPattern("HH:mm:ss");
+//        LocalTime localTime=LocalTime.now();
+//        LocalTime timeParse = LocalTime.parse(time, df);
+//        if(localTime.isAfter(timeParse)){
+//            msg.setError("下午4点之后禁止此操作");
+//            return msg;
+//        }
         List<ProdProcedureTeam> list=new ArrayList<>();
         ProdProcedureTeam p=new ProdProcedureTeam();
         BeanUtils.copyProperties(prodProcedureTeam,p);
@@ -854,14 +854,14 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
     @Override
     public HttpRespMsg teamAllocation(PlanProcedureTotal planProcedureTotal,String teamIds,Integer planType) throws Exception {
         HttpRespMsg msg=new HttpRespMsg();
-        String time="16:00:00";
-        DateTimeFormatter df=DateTimeFormatter.ofPattern("HH:mm:ss");
-        LocalTime localTime=LocalTime.now();
-        LocalTime timeParse = LocalTime.parse(time, df);
-        if(localTime.isAfter(timeParse)){
-            msg.setError("下午4点之后禁止此操作");
-            return msg;
-        }
+//        String time="16:00:00";
+//        DateTimeFormatter df=DateTimeFormatter.ofPattern("HH:mm:ss");
+//        LocalTime localTime=LocalTime.now();
+//        LocalTime timeParse = LocalTime.parse(time, df);
+//        if(localTime.isAfter(timeParse)){
+//            msg.setError("下午4点之后禁止此操作");
+//            return msg;
+//        }
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         BigDecimal totalWages=new BigDecimal((planProcedureTotal.getTotalWages()==null||StringUtils.isEmpty(planProcedureTotal.getTotalWages()))?0:planProcedureTotal.getTotalWages());
         BigDecimal totalWorkingHours=new BigDecimal((planProcedureTotal.getTotalWorkingHours()==null||StringUtils.isEmpty(planProcedureTotal.getTotalWorkingHours())?0:planProcedureTotal.getTotalWorkingHours()));
@@ -980,6 +980,9 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                             BigDecimal bigDecimal=new BigDecimal(sum);
                             bigDecimal=bigDecimal.divide(new BigDecimal(ps.getTeamIds().split(",").length));
                             ps.setTotalProgress(bigDecimal.intValue());
+                            if(procedureTeamList.stream().anyMatch(pl->pl.getProgress()>0&&pl.getStatus()==4)){
+                                ps.setNeedAddCircle(true);
+                            }
                         }
                     });
                     msg.setData(procedureTotals);

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue

@@ -307,6 +307,7 @@ export default {
         // ],
         num: [{ required: true, message: "数量", trigger: "blur" }],
         mainProcess: [{ required: true, message: "主工序", trigger: "blur" }],
+        progress: [{ required: true, message: "进度", trigger: "blur" }],
         stationId: [{ required: true, message: "工位", trigger: "blur" }],
         startDate: [{ required: true, message: "开工时间", trigger: "blur" }],
         endDate: [{ required: true, message: "完工时间", trigger: "blur" }],
@@ -862,6 +863,7 @@ export default {
 };
 </script>
 <style scoped lang='scss'>
+
 .today-tab-btn {
   width: 100%;
   display: flex;

+ 194 - 146
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponentDetil.vue

@@ -1,46 +1,74 @@
 <template>
-    <div class='planComponentDetil'>
-        <div class="planComponentDetil-top">
-            <div style="color: #02A7F0;cursor: pointer;" @click="toBack()"><i class="el-icon-arrow-left" style="padding-right: 10px;"></i>{{ leftText }}</div>
-            <div>{{ topText }}</div>
-            <div></div>
+  <div class="planComponentDetil">
+    <div class="planComponentDetil-top">
+      <div style="color: #02a7f0; cursor: pointer" @click="toBack()">
+        <i class="el-icon-arrow-left" style="padding-right: 10px"></i
+        >{{ leftText }}
+      </div>
+      <div>{{ topText }}</div>
+      <div></div>
+    </div>
+    <div class="planComponentDetil-con">
+      <!-- tab 切换 -->
+      <div class="today-tab">
+        <div
+          v-for="(item, index) in textArr"
+          :key="index"
+          :class="`${TabIndex === index ? 'on' : ''}`"
+          @click="tabChange(item, index)"
+        >
+          {{ item.name }}
         </div>
-        <div class="planComponentDetil-con">
-            <!-- tab 切换 -->
-            <div class="today-tab">
-                <div v-for="item,index in textArr" :key="index" :class="`${TabIndex === index ? 'on' : ''}`" @click="tabChange(item, index)">{{ item.name }}</div>
-            </div>
-            <!-- table数据 -->
-            <div v-if="TabIndex == 0" v-loading="tableDataLoading">
-                <el-table
-                :data="JobtableData"
-                :key="tableKey"
-                style="width: 100%;"
-                v-loading="tableDataLoading">
-                    <el-table-column label="工序名称" width="400">
-                        <template slot-scope="scope">{{ scope.row.prodProcedure.name }}</template>
-                    </el-table-column>
-                    <el-table-column label="单件工时" width="150">
-                        <template slot-scope="scope">{{ scope.row.prodProcedure.workingTime }}</template>
-                    </el-table-column>
-                    <el-table-column label="总工时" width="150">
-                        <template slot-scope="scope">{{ scope.row.totalWorkingHours }}</template>
-                    </el-table-column>
-                    <el-table-column label="单件工价" width="150">
-                        <template slot-scope="scope">{{ scope.row.prodProcedure.unitPrice }}</template>
-                    </el-table-column>
-                    <el-table-column label="总工价">
-                        <template slot-scope="scope">{{ scope.row.totalWages }}</template>
-                    </el-table-column>
-                    <el-table-column label="质检类型">
-                        <template slot-scope="scope">{{ scope.row.prodProcedure.checkType==0?"自检": scope.row.prodProcedure.checkType==1?"互检":"专检"}}</template>
-                    </el-table-column>
-                    <el-table-column label="组员" width="150">
-                        <template slot-scope="scope">{{ scope.row.teamNames }}</template>
-                    </el-table-column>
-                </el-table>
-            </div>
-            <!-- <div v-if="TabIndex == 1"  v-loading="tableDataLoading">
+      </div>
+      <!-- table数据 -->
+      <div v-if="TabIndex == 0" v-loading="tableDataLoading">
+        <el-table
+          :data="JobtableData"
+          :key="tableKey"
+          style="width: 100%"
+          v-loading="tableDataLoading"
+        >
+          <el-table-column label="工序名称" width="400">
+            <template slot-scope="scope">
+                <div class="disFlexscope">
+                    <span v-if="!scope.row.needAddCircle" class="yuanquan"></span>
+                    <span>{{ scope.row.prodProcedure.name }}</span>
+                </div>
+              </template>
+          </el-table-column>
+          <el-table-column label="单件工时" width="150">
+            <template slot-scope="scope">{{
+              scope.row.prodProcedure.workingTime
+            }}</template>
+          </el-table-column>
+          <el-table-column label="总工时" width="150">
+            <template slot-scope="scope">{{
+              scope.row.totalWorkingHours
+            }}</template>
+          </el-table-column>
+          <el-table-column label="单件工价" width="150">
+            <template slot-scope="scope">{{
+              scope.row.prodProcedure.unitPrice
+            }}</template>
+          </el-table-column>
+          <el-table-column label="总工价">
+            <template slot-scope="scope">{{ scope.row.totalWages }}</template>
+          </el-table-column>
+          <el-table-column label="质检类型">
+            <template slot-scope="scope">{{
+              scope.row.prodProcedure.checkType == 0
+                ? "自检"
+                : scope.row.prodProcedure.checkType == 1
+                ? "互检"
+                : "专检"
+            }}</template>
+          </el-table-column>
+          <el-table-column label="组员" width="150">
+            <template slot-scope="scope">{{ scope.row.teamNames }}</template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!-- <div v-if="TabIndex == 1"  v-loading="tableDataLoading">
                 <el-table
                 :data="MaterialtableData"
                 :key="tableKey"
@@ -87,125 +115,145 @@
                     </el-table-column>
                 </el-table>
             </div> -->
-        </div>
-        <!-- <div class="planComponentDetil-bon">3</div> -->
     </div>
+    <!-- <div class="planComponentDetil-bon">3</div> -->
+  </div>
 </template>
 
 <script>
 export default {
-    name: '',
-    components: {},
-    props: {},
-    data() {
-        return {
-            topText: '',
-            leftText: '',
-            id: '',
-            textArr: [{name: '派工单查看', value: 0}],
-            // textArr: [{name: '派工单查看', value: 0}, {name: '物料单查看', value: 1}],
-            TabIndex: 0,
-            tableDataLoading: false,
-            JobtableData: [],
-            MaterialtableData:[],
-            LackMaterialtableData:[],
-            tableKey: 1
-        }
+  name: "",
+  components: {},
+  props: {},
+  data() {
+    return {
+      topText: "",
+      leftText: "",
+      id: "",
+      textArr: [{ name: "派工单查看", value: 0 }],
+      // textArr: [{name: '派工单查看', value: 0}, {name: '物料单查看', value: 1}],
+      TabIndex: 0,
+      tableDataLoading: false,
+      JobtableData: [],
+      MaterialtableData: [],
+      LackMaterialtableData: [],
+      tableKey: 1,
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {
+    // const { id, topText, leftText } = this.$route.params
+    // const { id, topText, leftText } = this.$route.query
+    // console.log(this.$route.query, '携带')
+    const planDetilData = JSON.parse(localStorage.getItem("planDetilData"));
+    const { id, productSchedulingNum, productName } = planDetilData;
+    this.id = id;
+    this.topText = productSchedulingNum;
+    this.leftText = productName;
+    this.getPlanDetail();
+  },
+  methods: {
+    toBack() {
+      this.$router.go(-1);
     },
-    computed: {},
-    watch: {},
-    created() { },
-    mounted() { 
-        // const { id, topText, leftText } = this.$route.params
-        // const { id, topText, leftText } = this.$route.query
-        // console.log(this.$route.query, '携带')
-        const planDetilData = JSON.parse(localStorage.getItem('planDetilData'))
-        const { id, productSchedulingNum, productName } = planDetilData
-        this.id = id
-        this.topText = productSchedulingNum
-        this.leftText = productName
-        this.getPlanDetail()
-     },
-    methods: {
-        toBack() {
-            this.$router.go(-1)
-        },
-        tabChange(item, index) {
-            this.TabIndex = index
-            this.getPlanDetail()
-        },
-        getPlanDetail(){
-            this.tableDataLoading = true
-            this.http.post( '/plan/planDetail', {
-            id:this.id,
-            type:this.textArr[this.TabIndex].value
+    tabChange(item, index) {
+      this.TabIndex = index;
+      this.getPlanDetail();
+    },
+    getPlanDetail() {
+      this.tableDataLoading = true;
+      this.http.post(
+        "/plan/planDetail",
+        {
+          id: this.id,
+          type: this.textArr[this.TabIndex].value,
         },
-          res => {
-            this.tableDataLoading = false
-            if (res.code == "ok") {
-              this.tableKey++
-              this.JobtableData=res.data
-              this.MaterialtableData=res.data.material
-              this.LackMaterialtableData=res.data.lackMaterial
-            } else {
-              this.$message({
-                message: res.msg,
-                type: "error"
-              });
-            }
-          },error => {
-            this.tableDataLoading = false
+        (res) => {
+          this.tableDataLoading = false;
+          if (res.code == "ok") {
+            this.tableKey++;
+            this.JobtableData = res.data;
+            this.MaterialtableData = res.data.material;
+            this.LackMaterialtableData = res.data.lackMaterial;
+          } else {
             this.$message({
-              message: error,
-              type: "error"
+              message: res.msg,
+              type: "error",
             });
+          }
+        },
+        (error) => {
+          this.tableDataLoading = false;
+          this.$message({
+            message: error,
+            type: "error",
           });
         }
+      );
     },
-}
+  },
+};
 </script>
 <style scoped lang='scss'>
-    * {
-        box-sizing: border-box;
-    }
-    .planComponentDetil {
-        width: 100%;
-        height: 100%;
-        display: flex;
-        flex-wrap: wrap;
-        // flex-direction: inherit;
-        flex-direction: column;
-        box-sizing: border-box;
-        // padding: 20px;
-        .planComponentDetil-top, .planComponentDetil-con, .planComponentDetil-bon {
-            width: 100%;
-            padding: 20px 20px;
-            border-bottom: 1px solid #c5c5c5;
-        }
-        .planComponentDetil-top {
-            display: flex;
-            justify-content: space-between;
-        }
-        .planComponentDetil-con {
-            flex: 1;
-
-            .today-tab {
-                display: flex;
-                overflow-x: auto;
-                div {
-                font-size: 18px;
-                margin-left: 15px;
-                cursor: pointer;
-                }
-                .on {
-                color: #02A7F0;
-                }
-            }
-        }
+* {
+  box-sizing: border-box;
+}
+.yuanquan {
+  width: 15px;
+  height: 15px;
+  display: inline-block;
+  border-radius: 50%;
+  border: 4px solid red;
+  margin-right: 4px;
+  position: relative;
+  top: 4px;
+}
+.disFlexscope {
+    display: flex;
+    align-content: center;
+}
+.planComponentDetil {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  // flex-direction: inherit;
+  flex-direction: column;
+  box-sizing: border-box;
+  // padding: 20px;
+  .planComponentDetil-top,
+  .planComponentDetil-con,
+  .planComponentDetil-bon {
+    width: 100%;
+    padding: 20px 20px;
+    border-bottom: 1px solid #c5c5c5;
+  }
+  .planComponentDetil-top {
+    display: flex;
+    justify-content: space-between;
+  }
+  .planComponentDetil-con {
+    flex: 1;
 
-        .quesa-text {
-            font-size: 16px;
-            padding: 20px 0;
-        }
+    .today-tab {
+      display: flex;
+      overflow-x: auto;
+      div {
+        font-size: 18px;
+        margin-left: 15px;
+        cursor: pointer;
+      }
+      .on {
+        color: #02a7f0;
+      }
     }
+  }
+
+  .quesa-text {
+    font-size: 16px;
+    padding: 20px 0;
+  }
+}
 </style>