Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | terminationQuantity:'生产终止数量', |
| | | terminationMsg:'请输入正确的可修改数量', |
| | | maxCompleted:'最大已完工数量', |
| | | updateProcessMsg:'保存失败!请检查变更工序是否报工', |
| | | termination:'终止', |
| | | }, |
| | | reportingWorks:{ |
| | | page:{ |
| | |
| | | {field: 'effectiveCuttingRate', width: 100, title: '有效切裁率',}, |
| | | {field: 'residueGlassCuttingRate', width: 100, title: '尾片切裁率',}, |
| | | {field: 'amountOfOriginalGlassUsage1', width: 100, title: '原料使用数',}, |
| | | {field: 'averageCuttingRate1', width: 100, title: '平均切裁率',}, |
| | | // {field: 'averageCuttingRate1', width: 100, title: '平均切裁率',}, |
| | | {field: 'notes', width: 50, title: '备注',}, |
| | | {field: 'creator', width: 100, title: '创建人',}, |
| | | {field: 'createTime', width: 100, title: '创建时间',}, |
| | |
| | | ElMessage.warning('请选择要查看的工程'); |
| | | return; |
| | | } |
| | | |
| | | localStorage.setItem('projectNo', row.projectNumber); |
| | | console.log("projectNo:", row.projectNumber); |
| | | |
| | | try { |
| | | await router.push({ |
| | |
| | | // 更新 store 数据 |
| | | if (result.layouts && result.layouts.length > 0) { |
| | | orderInfo.optimizeData.optimalResults = { |
| | | projectNo: result.projectNo, |
| | | glassThickness: result.glassThickness, |
| | | glassType: result.glassType, |
| | | totalQuantity: result.totalQuantity, |
| | | glassTotalQuantity: result.glassTotalQuantity, |
| | | glassTotalArea: result.glassTotalArea, |
| | | avgCutRate: result.avgCutRate, |
| | | lastCutRate: result.lastCutRate, |
| | | validCutRate: result.validCutRate, |
| | | layouts: result.layouts |
| | | }; |
| | | } |
| | |
| | | |
| | | const {t} = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const username = userStore.user.userId |
| | | let rowClickIndex = ref(null) |
| | | |
| | | let props = defineProps({ |
| | |
| | | |
| | | |
| | | onMounted(() => { |
| | | console.log(userStore.user); |
| | | getProjectId(); |
| | | selectGlassType(); |
| | | |
| | |
| | | const checkAutoRedirectToOptimize = () => { |
| | | // 检查路由中是否有自动跳转标识 |
| | | if (route.query.redirect === 'optimizeControl') { |
| | | // 延迟一段时间确保页面加载完成后再跳转 |
| | | setTimeout(() => { |
| | | const projectNo = route.params.projectNo || localStorage.getItem('currentProjectNo'); |
| | | if (projectNo) { |
| | |
| | | const saveCraft = () => { |
| | | //rowIndex.value.process = craftObj.newCraft.join('->') |
| | | let orderProcess= craftObj.newCraft.join('->') |
| | | request.post(`/processCard/updateProcess/${rowIndex.value.process_id}/${rowIndex.value.technology_number}/${rowIndex.value.order_id}/${orderProcess}`, craftObj).then((res) => { |
| | | request.post(`/processCard/updateProcess/${rowIndex.value.process_id}/${rowIndex.value.order_number}/${rowIndex.value.technology_number}/${rowIndex.value.order_id}/${orderProcess}`, craftObj).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({ |
| | |
| | | }) |
| | | } else { |
| | | |
| | | ElMessage.warning('保存失败,检查是否报工') |
| | | ElMessage.warning(t('processCard.updateProcessMsg')) |
| | | |
| | | } |
| | | }) |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="updateCraft(row)" link type="primary" size="small">{{$t('craft.updateCraft')}}</el-button> |
| | | <el-button @click="updateTermination(row)" link type="primary" size="small">终止</el-button> |
| | | <el-button @click="updateTermination(row)" link type="primary" size="small">{{$t('processCard.termination')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | {field: 'glassChild', width: 90, title: t('reportingWorks.glassChild'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'glassAddress', width: 120, title: t('replenish.sliceMarking'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'patchNum', width: 120, title: t('order.quantity'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'patchArea', width: 120, title: t('order.area'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: 80, title: t('order.width'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height', width: 80, title: t('order.height'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'shape', width: 100, title: t('order.shape'), sortable: true,slots: { filter: 'num1_filter',default:'default_shape' }}, |
| | |
| | | } |
| | | |
| | | @ApiOperation("修改工艺流程") |
| | | @PostMapping("/updateProcess/{processId}/{technologyNumber}/{orderId}/{process}") |
| | | @PostMapping("/updateProcess/{processId}/{orderNumber}/{technologyNumber}/{orderId}/{process}") |
| | | public Result updateProcess( |
| | | @PathVariable String processId, |
| | | @PathVariable String orderNumber, |
| | | @PathVariable String technologyNumber, |
| | | @PathVariable String orderId, |
| | | @PathVariable String process, |
| | | @RequestBody Map<String, Object> object |
| | | ) { |
| | | |
| | | return Result.seccess(flowCardService.updateProcessSv(processId,technologyNumber,orderId,process,object)); |
| | | return Result.seccess(flowCardService.updateProcessSv(processId,orderNumber,technologyNumber,orderId,process,object)); |
| | | } |
| | | |
| | | @ApiOperation("工程打印标签次数修改") |
| | |
| | | import com.example.erp.dto.pp.FlowCardDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | Integer selectCompletedMp(String processId, Integer orderNumber, String interceptProcess); |
| | | |
| | | String getProcessOk(String processId, String technologyNumber); |
| | | String getProcessOk(String processId,String orderNumber, String technologyNumber); |
| | | |
| | | List<OrderProcessDetail> getProcessDetail(String processId,String orderNumber, String technologyNumber, String process); |
| | | |
| | | Boolean updateOrderProcessDetail(String processId, String orderNumber, Integer technologyNumber, |
| | | int reportingWorkNumCount, int reportingWorkNum, int brokenNum, String process); |
| | | } |
| | |
| | | void deleteOffcutDetails(String processId); |
| | | |
| | | void addUpdateOffcut(Map<String, Object> detail, String processId, String glassType, String glassThickness); |
| | | |
| | | void updateProjectOptimize(String projectId, Integer states, Map<String, Object> optimalResults); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updateProcessSv(String processId, String technologyNumber, String orderId, String Orderprocess, Map<String, Object> object) { |
| | | public Boolean updateProcessSv(String processId,String orderNumber, String technologyNumber, String orderId, String Orderprocess, Map<String, Object> object) { |
| | | List<OrderProcessDetail> resultList = new ArrayList<>(); |
| | | //获取已报工工艺流程 |
| | | String processOk = flowCardMapper.getProcessOk(processId,technologyNumber); |
| | | //判断该流程卡是否报工 |
| | | Integer count = flowCardMapper.reportingWorkCount(processId); |
| | | if (count == 0) { |
| | | String processOk = flowCardMapper.getProcessOk(processId,orderNumber,technologyNumber); |
| | | if (processOk != null && !processOk.isEmpty()){ |
| | | List<String> okList = Arrays.asList(processOk.split("->")); |
| | | List<String> orderList = Arrays.asList(Orderprocess.split("->")); |
| | | |
| | | // 判断 processOk 的每个工序是否都包含在 orderProcess 中 |
| | | for (String p : okList) { |
| | | if (!orderList.contains(p)) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | for (String process : okList) { |
| | | List<OrderProcessDetail> details = |
| | | flowCardMapper.getProcessDetail(processId,orderNumber, technologyNumber, process); |
| | | |
| | | if (details != null && !details.isEmpty()) { |
| | | resultList.addAll(details); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //删除小片工艺表对应的数据 |
| | | flowCardMapper.deleteProcessMp(processId, technologyNumber); |
| | | //重新插入修改好工艺流程卡的数据 |
| | |
| | | } |
| | | } |
| | | } |
| | | //将原来已报工的数据更新 |
| | | if (resultList != null && !resultList.isEmpty()) { |
| | | for (OrderProcessDetail d : resultList) { |
| | | flowCardMapper.updateOrderProcessDetail(d.getProcessId(),d.getOrderNumber(),d.getTechnologyNumber(), |
| | | d.getReportingWorkNumCount(),d.getReportingWorkNum(),d.getBrokenNum(),d.getProcess()); |
| | | |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | return true; |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | glassOptimizeMapper.addOptimizeDetail(objectMap2,projectId); |
| | | } |
| | | glassOptimizeMapper.updateProjectOptimizeStateMp(projectId,1); |
| | | |
| | | glassOptimizeMapper.updateProjectOptimize(projectId, 1, optimalResults); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | GROUP_CONCAT(process ORDER BY id SEPARATOR '->') AS processes |
| | | FROM sd.order_process_detail |
| | | WHERE process_id = #{processId} |
| | | AND order_number = #{orderNumber} |
| | | AND technology_number = #{technologyNumber} |
| | | AND reporting_work_num_count > 0; |
| | | </select> |
| | | |
| | | <select id="getProcessDetail"> |
| | | SELECT * |
| | | FROM sd.order_process_detail |
| | | WHERE process_id = #{processId} |
| | | AND order_number = #{orderNumber} |
| | | AND technology_number = #{technologyNumber} |
| | | AND reporting_work_num_count > 0 |
| | | AND process = #{process} |
| | | </select> |
| | | |
| | | <update id="updateOrderProcessDetail"> |
| | | UPDATE sd.order_process_detail |
| | | set reporting_work_num_count = #{reportingWorkNumCount}, |
| | | reporting_work_num = #{reportingWorkNum}, |
| | | broken_num = #{brokenNum} |
| | | where process_id = #{processId} and order_number = #{orderNumber} and |
| | | technology_number = #{technologyNumber} and process = #{process} |
| | | </update> |
| | | </mapper> |
| | |
| | | `p`.`frist_stock_qty` AS `Amount of original glass usage 1`, |
| | | concat(`p`.`frist_cut_pct`, ' %') AS `Average cutting rate 1`, |
| | | `p`.`remark` AS `Notes`, |
| | | `a`.`name` AS `Creator`, |
| | | `u`.`user_name` AS `Creator`, |
| | | `p`.`create_time` AS `Create time`, |
| | | `p`.`update_time` AS `Modify time` |
| | | from pp.optimize_project as p |
| | | left join pp.optimize_admin as a on p.creater = a.Id |
| | | left join erp_user_info.user as u on p.creater = u.login_name |
| | | where (`p`.`state` > 0) |
| | | # and (tempering_state>0 or optimize_state>0) |
| | | and DATE (`p`.`create_time`) BETWEEN #{startSelectTime} AND #{endSelectTime} |
| | |
| | | |
| | | <update id="updateProjectMp"> |
| | | update pp.optimize_project set project_name=#{projectNmae},glass_total=#{sumQuantity},glass_total_area= #{sumArea}, |
| | | type=#{type},process_qty=#{processIdCount},process_cards=#{processId} where project_no=#{projectId} |
| | | type=#{type},process_qty=#{processIdCount},process_cards=#{processId},creater = #{userName} where project_no=#{projectId} |
| | | </update> |
| | | |
| | | <insert id="addProjectMp"> |
| | | insert into pp.optimize_project (project_no, project_name, order_glass_type, order_glass_thickness,glass_type, glass_thickness, |
| | | glass_total,glass_total_area,type,state,process_qty,process_cards) |
| | | glass_total,glass_total_area,type,state,process_qty,process_cards,creater ) |
| | | values (#{projectId}, #{projectNmae}, #{glassType}, #{glassThickness}, #{glassType}, #{glassThickness},#{sumQuantity}, #{sumArea}, |
| | | #{type},1,#{processIdCount},#{processId}) |
| | | #{type},1,#{processIdCount},#{processId},#{userName}) |
| | | </insert> |
| | | |
| | | |
| | |
| | | WHERE |
| | | project_no = #{processId} AND polys_id = #{detail.polySort} |
| | | </update> |
| | | <update id="updateProjectOptimize"> |
| | | update pp.optimize_project as p |
| | | set p.optimize_state = #{states}, |
| | | p.avg_cut_pct = #{optimalResults.avgCutRate}, |
| | | p.valid_cut_pct = #{optimalResults.validCutRate}, |
| | | p.last_cut_pct = #{optimalResults.lastCutRate}, |
| | | p.raw_stock_qty = #{optimalResults.totalQuantity} |
| | | where p.project_no = #{projectId} |
| | | </update> |
| | | |
| | | <select id="simulatedTypesettingUsingOpt"> |
| | | SELECT |