| | |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | titleSelectJson.value.processType.unshift(newItem.value) |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | |
| | | total.value = res.data.footSum |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | produceList = res.data.data |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | console.log(produceList) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | const sumMmValues = (workProcessName) => { |
| | | if (!workProcessName) return 0; |
| | | |
| | | return workProcessName |
| | | .split('+') // 拆分每个部分 |
| | | .map(part => { |
| | | const match = part.match(/^(\d+)(?=mm)/); // 提取 mm 前面的数字 |
| | | return match ? parseInt(match[1], 10) : 0; |
| | | }) |
| | | .reduce((sum, num) => sum + num, 0); // 求和 |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | |
| | | pageNum.value=1 |
| | | total.value = res.data.footSum |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading=false |
| | | } else { |
| | |
| | | {field: 'code', width: 100, title: t('reportingWorks.glassNumber')}, |
| | | {field: 'width', width: 90, title: t('order.width')}, |
| | | {field: 'height', width: 90, title: t('order.height')}, |
| | | {field: 'mmTotal', width: 90, title: t('order.totalThickness')}, |
| | | {field: 'workProcessName', width: 120, title: t('report.workProcessName')}, |
| | | {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')}, |
| | |
| | | |
| | | |
| | | import com.example.erp.dto.pp.*; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.Report; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | List<YieldDTO> exportYieldMp(List<LocalDate> date, String process); |
| | | |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | |
| | | Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | |
| | | |
| | | Map<String,Float> teamOutputFootSum(Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | | String getLaminating(String selectProcesses); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | |
| | | } |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | String laminating = reportMapper.getLaminating(selectProcesses); |
| | | map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO)); |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | map.put("footSum" ,reportMapper.teamOutputFootSum(selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code, |
| | | rw.reviewed, |
| | | rw.examine_time, |
| | | GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName |
| | | -- GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName |
| | | CASE |
| | | WHEN #{laminating} = 'laminating' THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+') |
| | | ELSE MAX( ogd.glass_child ) |
| | | END AS workProcessName |
| | | FROM |
| | | reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | |
| | | rw.teams_groups_name |
| | | ) as subquery |
| | | </select> |
| | | |
| | | <select id="getLaminating"> |
| | | select IFNULL(nickname,'') from sd.basic_data where basic_category='process' and basic_name=#{selectProcesses} |
| | | </select> |
| | | </mapper> |