| | |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | //第一次加载 |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | |
| | | optionVal = null |
| | | } |
| | | //第一次加载数据 |
| | | request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | request.post(`/report/workInProgress/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${optionVal}`, filterData.value).then((res) => { |
| | | request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${inputVal}/${optionVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | request.post(`/report/workInProgress/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <!-- <el-input placeholder="销售单号" v-model="form.name" style="width: 150px"/>--> |
| | | <!-- <el-input placeholder="项目名称" v-model="form.name" style="width: 150px"/>--> |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY/MM/DD" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input> |
| | | |
| | | <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input> |
| | |
| | | |
| | | @ApiOperation("在制品报表") |
| | | @SaCheckPermission("WorkInProgress.search") |
| | | @PostMapping("/workInProgress/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}") |
| | | @PostMapping("/workInProgress/{orderId}/{inputProject}/{selectProcesses}/{optionVal}") |
| | | public Result workInProgress( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String inputProject, |
| | | @PathVariable String selectProcesses, |
| | | @PathVariable String optionVal, |
| | | @RequestBody Report report) { |
| | | return Result.seccess(reportService.workInProgressSv(selectTime1, selectTime2, orderId, inputProject, selectProcesses,optionVal, report)); |
| | | return Result.seccess(reportService.workInProgressSv( orderId, inputProject, selectProcesses,optionVal, report)); |
| | | |
| | | } |
| | | |
| | |
| | | Map<String, Integer> getProcessBreakingTotal(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | |
| | | List<Map<String, String>> workInProgressMp( |
| | | @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | | @Param("orderId") String orderId, @Param("inputProject") String inputProject, |
| | | @Param("selectProcesses") String selectProcesses, Report report); |
| | | |
| | |
| | | |
| | | Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | | List<Map<String, String>> workInProgressOrderMp(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report); |
| | | List<Map<String, String>> workInProgressOrderMp( String orderId, String inputProject, String selectProcesses, Report report); |
| | | |
| | | List<Map<String, String>> workInProgressProcessMp(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report); |
| | | List<Map<String, String>> workInProgressProcessMp( String orderId, String inputProject, String selectProcesses, Report report); |
| | | |
| | | List<ScheduleProductionScheduleDTO> scheduleProductionScheduleMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String processes, ScheduleProductionScheduleDTO scheduleProductionScheduleDTO); |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> workInProgressSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, String optionVal, Report report) { |
| | | public Map<String, Object> workInProgressSv( String orderId, String inputProject, String selectProcesses, String optionVal, Report report) { |
| | | |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (optionVal.equals("1")){ |
| | | /* 根据销售单号汇总*/ |
| | | map.put("data", reportMapper.workInProgressOrderMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report)); |
| | | map.put("data", reportMapper.workInProgressOrderMp( orderId, inputProject, selectProcesses, report)); |
| | | |
| | | }else if(optionVal.equals("2")){ |
| | | /* 根流程卡号汇总*/ |
| | | map.put("data", reportMapper.workInProgressProcessMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report)); |
| | | map.put("data", reportMapper.workInProgressProcessMp( orderId, inputProject, selectProcesses, report)); |
| | | } else if (optionVal.equals("3")) { |
| | | |
| | | } else { |
| | | |
| | | map.put("data", reportMapper.workInProgressMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report)); |
| | | map.put("data", reportMapper.workInProgressMp( orderId, inputProject, selectProcesses, report)); |
| | | } |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where rwk.this_process = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where rwk.this_process = #{process} |
| | | and rw.review_status = 1 |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where rwk.this_process = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where rwk.this_process = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | |