north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -793,7 +793,7 @@ //第一次加载数据 let groupChangeProcess = ref(false)//用于本班组显示问题 request.post(`/reportingWork/selectProcess`).then((res) => { request.post(`/reportingWork/selectProcess/${user.user.userId}`).then((res) => { if (res.code == 200) { titleSelectJson.value.processType = res.data.process if(user.user.address!==null && user.user.address!==''){ north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -40,9 +40,9 @@ return Result.seccess(reportingWorkService.AddSelectLastWorkSv(processIdStr,technologyStr,process,reportType)); } @ApiOperation("查询工序") @PostMapping ("/selectProcess") public Result SelectProcess() { return Result.seccess(reportingWorkService.SelectProcessSv()); @PostMapping ("/selectProcess/{userId}") public Result SelectProcess(@PathVariable String userId) { return Result.seccess(reportingWorkService.SelectProcessSv(userId)); } @ApiOperation("报工新增") north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
@@ -88,4 +88,10 @@ Boolean updateRWPatchNum(String reportingWorkId, Integer patchNum); Boolean updateRWDPatchNum(String reportingWorkId, String orderSort, Integer technologyNumber, Integer patchNum); String selectUserProcess(String userId); List<Map<String,String>> getSelectProcessJiajiao(); List<Map<String,String>> getSelectProcessDuoqu(); } north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -25,7 +25,6 @@ import com.example.erp.service.userInfo.LogService; import com.example.erp.service.userInfo.SysErrorService; import com.github.yulichang.wrapper.MPJLambdaWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; @@ -178,9 +177,21 @@ } //查询工序 public Map<String, Object> SelectProcessSv() { public Map<String, Object> SelectProcessSv(String userId) { Map<String, Object> map = new HashMap<>(); map.put("process", reportingWorkMapper.SelectProcessMp()); String process = reportingWorkMapper.selectUserProcess(userId); if (process==null) { map.put("process", reportingWorkMapper.SelectProcessMp()); } else { if (process.equals("夹胶")){ map.put("process",reportingWorkMapper.getSelectProcessJiajiao() ); } if (process.equals("技术部多曲")){ map.put("process",reportingWorkMapper.getSelectProcessDuoqu() ); } } return map; } north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -886,4 +886,32 @@ where reporting_work_id=#{reportingWorkId} and order_number = #{orderSort} and technology_number = #{technologyNumber} </update> <select id="selectUserProcess"> select address from erp_user_info.user where login_name=#{userId} </select> <select id="getSelectProcessJiajiao"> SELECT * FROM ( SELECT * FROM sd.basic_data WHERE basic_type='product' AND basic_category='process' AND basic_name='夹胶' UNION SELECT * FROM sd.basic_data WHERE basic_type='product' AND basic_category='process' AND basic_name='均质' ) AS combined_results; </select> <select id="getSelectProcessDuoqu"> SELECT * FROM ( SELECT * FROM sd.basic_data WHERE basic_type='product' AND basic_category='process' AND basic_name='技术部多曲' UNION SELECT * FROM sd.basic_data WHERE basic_type='product' AND basic_category='process' AND basic_name='钢化' ) AS combined_results; </select> </mapper>