正在显示
6 个修改的文件
包含
29 行增加
和
3 行删除
| @@ -99,8 +99,21 @@ public class TblProductionGongxuController extends JeecgController<TblProduction | @@ -99,8 +99,21 @@ public class TblProductionGongxuController extends JeecgController<TblProduction | ||
| 99 | @PutMapping("/updateYan") | 99 | @PutMapping("/updateYan") |
| 100 | public Result<?> updateYan(@RequestBody List<TblProductionGongxu> tblProductionGongxuList){ | 100 | public Result<?> updateYan(@RequestBody List<TblProductionGongxu> tblProductionGongxuList){ |
| 101 | boolean b = tblProductionGongxuService.updateBatchById(tblProductionGongxuList); | 101 | boolean b = tblProductionGongxuService.updateBatchById(tblProductionGongxuList); |
| 102 | + LambdaQueryWrapper<TblProductionGongxu> queryWrapper=new LambdaQueryWrapper<TblProductionGongxu>() | ||
| 103 | + .eq(TblProductionGongxu::getOrderNumber,tblProductionGongxuList.get(0).getOrderNumber()); | ||
| 102 | if(b){ | 104 | if(b){ |
| 103 | - | 105 | + List<TblProductionGongxu> list = tblProductionGongxuService.list(queryWrapper); |
| 106 | + boolean allHhhQualified = true; | ||
| 107 | + for (TblProductionGongxu productionGongxu : list) { | ||
| 108 | + if (!"合格入库".equals(productionGongxu.getYanResult())) { | ||
| 109 | + // 如果有任何一个元素的hhh值不是“合格入库”,则置标志位为false,并跳出循环 | ||
| 110 | + allHhhQualified = false; | ||
| 111 | + break; | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + if(allHhhQualified){ | ||
| 115 | + tblProductionGongxuService.updateByStatus(tblProductionGongxuList.get(0).getOrderNumber()); | ||
| 116 | + } | ||
| 104 | } | 117 | } |
| 105 | return Result.ok("修改成功"); | 118 | return Result.ok("修改成功"); |
| 106 | } | 119 | } |
| @@ -68,7 +68,6 @@ public class TblProductionPlanController extends JeecgController<TblOrderForm, I | @@ -68,7 +68,6 @@ public class TblProductionPlanController extends JeecgController<TblOrderForm, I | ||
| 68 | queryWrapper.eq("product_design_status","1"); | 68 | queryWrapper.eq("product_design_status","1"); |
| 69 | Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize); | 69 | Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize); |
| 70 | IPage<TblOrderForm> pageList = tblOrderFormService.page(page, queryWrapper); | 70 | IPage<TblOrderForm> pageList = tblOrderFormService.page(page, queryWrapper); |
| 71 | - | ||
| 72 | return Result.OK(pageList); | 71 | return Result.OK(pageList); |
| 73 | } | 72 | } |
| 74 | 73 |
| @@ -18,4 +18,6 @@ public interface TblProductionGongxuMapper extends BaseMapper<TblProductionGongx | @@ -18,4 +18,6 @@ public interface TblProductionGongxuMapper extends BaseMapper<TblProductionGongx | ||
| 18 | void updateByNumber(TblOrderForm tblOrderForm); | 18 | void updateByNumber(TblOrderForm tblOrderForm); |
| 19 | 19 | ||
| 20 | TblOrderForm getByhours(String orderNumber); | 20 | TblOrderForm getByhours(String orderNumber); |
| 21 | + | ||
| 22 | + void updateByStatus(String orderNumber); | ||
| 21 | } | 23 | } |
| @@ -3,9 +3,13 @@ | @@ -3,9 +3,13 @@ | ||
| 3 | <mapper namespace="org.jeecg.modules.erp.production.mapper.TblProductionGongxuMapper"> | 3 | <mapper namespace="org.jeecg.modules.erp.production.mapper.TblProductionGongxuMapper"> |
| 4 | 4 | ||
| 5 | <update id="updateByNumber"> | 5 | <update id="updateByNumber"> |
| 6 | - update tbl_order_form set dispatched_working_hours=#{dispatchedWorkingHours},dispatch_status=1 | 6 | + update tbl_order_form set dispatched_working_hours=#{dispatchedWorkingHours},dispatch_status=1,verify_status=0 |
| 7 | where order_id=#{orderId} | 7 | where order_id=#{orderId} |
| 8 | </update> | 8 | </update> |
| 9 | + <update id="updateByStatus"> | ||
| 10 | + update tbl_order_form set verify_status=1 | ||
| 11 | + where order_id=#{orderNumber} | ||
| 12 | + </update> | ||
| 9 | <select id="getByhours" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> | 13 | <select id="getByhours" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> |
| 10 | select * from tbl_order_form where order_id=#{orderNumber} | 14 | select * from tbl_order_form where order_id=#{orderNumber} |
| 11 | </select> | 15 | </select> |
| @@ -16,4 +16,6 @@ public interface ITblProductionGongxuService extends IService<TblProductionGongx | @@ -16,4 +16,6 @@ public interface ITblProductionGongxuService extends IService<TblProductionGongx | ||
| 16 | void updateByNumber(TblOrderForm tblOrderForm); | 16 | void updateByNumber(TblOrderForm tblOrderForm); |
| 17 | 17 | ||
| 18 | TblOrderForm getByhours(String orderNumber); | 18 | TblOrderForm getByhours(String orderNumber); |
| 19 | + | ||
| 20 | + void updateByStatus(String orderNumber); | ||
| 19 | } | 21 | } |
| 1 | package org.jeecg.modules.erp.production.service.impl; | 1 | package org.jeecg.modules.erp.production.service.impl; |
| 2 | 2 | ||
| 3 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; | 3 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; |
| 4 | +import org.jeecg.modules.erp.order_form.mapper.TblOrderFormMapper; | ||
| 4 | import org.jeecg.modules.erp.production.entity.TblProductionGongxu; | 5 | import org.jeecg.modules.erp.production.entity.TblProductionGongxu; |
| 5 | import org.jeecg.modules.erp.production.mapper.TblProductionGongxuMapper; | 6 | import org.jeecg.modules.erp.production.mapper.TblProductionGongxuMapper; |
| 6 | import org.jeecg.modules.erp.production.service.ITblProductionGongxuService; | 7 | import org.jeecg.modules.erp.production.service.ITblProductionGongxuService; |
| @@ -29,4 +30,9 @@ public class TblProductionGongxuServiceImpl extends ServiceImpl<TblProductionGon | @@ -29,4 +30,9 @@ public class TblProductionGongxuServiceImpl extends ServiceImpl<TblProductionGon | ||
| 29 | public TblOrderForm getByhours(String orderNumber) { | 30 | public TblOrderForm getByhours(String orderNumber) { |
| 30 | return tblProductionGongxuMapper.getByhours(orderNumber); | 31 | return tblProductionGongxuMapper.getByhours(orderNumber); |
| 31 | } | 32 | } |
| 33 | + | ||
| 34 | + @Override | ||
| 35 | + public void updateByStatus(String orderNumber) { | ||
| 36 | + tblProductionGongxuMapper.updateByStatus(orderNumber); | ||
| 37 | + } | ||
| 32 | } | 38 | } |
-
请 注册 或 登录 后发表评论