Showing
3 changed files
with
25 additions
and
3 deletions
| ... | ... | @@ -177,6 +177,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { |
| 177 | 177 | private String productionProcess; |
| 178 | 178 | |
| 179 | 179 | /** |
| 180 | + * 是否展示生产工艺 | |
| 181 | + */ | |
| 182 | + @ApiModelProperty("是否展示审核按钮") | |
| 183 | + private Boolean showProductionProcess; | |
| 184 | + | |
| 185 | + /** | |
| 180 | 186 | * 办事处 |
| 181 | 187 | */ |
| 182 | 188 | @ApiModelProperty("办事处") | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| ... | ... | @@ -155,13 +155,29 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 155 | 155 | if (currentUserId.equals(data.getContractCreateById())) { |
| 156 | 156 | isCreateBy = true; |
| 157 | 157 | } |
| 158 | + //品质管理科才展示生产工艺 | |
| 159 | + List<SysUserDept> userDeptList = sysUserDeptService.getByUserId(SecurityUtil.getCurrentUser().getId()); | |
| 160 | + if (CollectionUtils.isNotEmpty(userDeptList)) { | |
| 161 | + boolean b = false; | |
| 162 | + for (SysUserDept sysUserDept : userDeptList) { | |
| 163 | + String deptId = sysUserDept.getDeptId(); | |
| 164 | + SysDept sysDept = sysDeptService.findById(deptId); | |
| 165 | + String code = sysDept.getCode(); | |
| 166 | + if ("YFCPZGLK".equals(code) || "EFCPZGLK".equals(code) | |
| 167 | + || "SFCPZGLK".equals(code) || "ZTFCPZGLK".equals(code)) { | |
| 168 | + b = true; | |
| 169 | + break; | |
| 170 | + } | |
| 171 | + } | |
| 172 | + result.setShowProductionProcess(b); | |
| 173 | + } | |
| 158 | 174 | result.setContractCreateBy(isCreateBy); |
| 159 | 175 | QueryPurchaseOrderLineVo vo = new QueryPurchaseOrderLineVo(); |
| 160 | 176 | vo.setPurchaseOrderId(id); |
| 161 | 177 | List<PurchaseOrderLine> purchaseOrderLineList = purchaseOrderLineService.query(vo); |
| 162 | 178 | if (CollectionUtil.isNotEmpty(purchaseOrderLineList)) { |
| 163 | 179 | //生产人员不展示价格,根据部门判断(生产管理科、精轧一车间、精轧车间、品质管理科),需要生产的控制价格 |
| 164 | - List<SysUserDept> userDeptList = sysUserDeptService.getByUserId(SecurityUtil.getCurrentUser().getId()); | |
| 180 | +// List<SysUserDept> userDeptList = sysUserDeptService.getByUserId(SecurityUtil.getCurrentUser().getId()); | |
| 165 | 181 | if (CollectionUtils.isNotEmpty(userDeptList)) { |
| 166 | 182 | boolean b = false; |
| 167 | 183 | for (SysUserDept sysUserDept : userDeptList) { | ... | ... |
| ... | ... | @@ -290,7 +290,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 290 | 290 | .set(PurchaseOrderInfo::getRemarks, StringUtil.isBlank(vo.getRemarks()) ? null : vo.getRemarks()) |
| 291 | 291 | .set(PurchaseOrderInfo::getStatus, StringUtil.isBlank(vo.getStatus()) ? null : vo.getStatus()) |
| 292 | 292 | .set(PurchaseOrderInfo::getExamineStatus, "AUDIT")//审核中 |
| 293 | - .set(PurchaseOrderInfo::getProductionProcess, StringUtil.isBlank(vo.getProductionProcess()) ? null : vo.getProductionProcess()) | |
| 293 | + .set(vo.getProductionProcess() != null, PurchaseOrderInfo::getProductionProcess, StringUtil.isBlank(vo.getProductionProcess()) ? null : vo.getProductionProcess()) | |
| 294 | 294 | .set(PurchaseOrderInfo::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) |
| 295 | 295 | .set(PurchaseOrderInfo::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId()) |
| 296 | 296 | .set(PurchaseOrderInfo::getCustomerCreditId, StringUtil.isBlank(vo.getCustomerCreditId()) ? null : vo.getCustomerCreditId()) |
| ... | ... | @@ -351,7 +351,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 351 | 351 | .set(PurchaseOrderInfo::getElement, StringUtil.isBlank(vo.getElement()) ? null : vo.getElement()) |
| 352 | 352 | .set(PurchaseOrderInfo::getPackaging, StringUtil.isBlank(vo.getPackaging()) ? null : vo.getPackaging()) |
| 353 | 353 | .set(PurchaseOrderInfo::getRemarks, StringUtil.isBlank(vo.getRemarks()) ? null : vo.getRemarks()) |
| 354 | - .set(PurchaseOrderInfo::getProductionProcess, StringUtil.isBlank(vo.getProductionProcess()) ? null : vo.getProductionProcess()) | |
| 354 | + .set(vo.getProductionProcess() != null, PurchaseOrderInfo::getProductionProcess, StringUtil.isBlank(vo.getProductionProcess()) ? null : vo.getProductionProcess()) | |
| 355 | 355 | .set(PurchaseOrderInfo::getPackagingFee, vo.getPackagingFee() == null ? null : vo.getPackagingFee()) |
| 356 | 356 | .eq(PurchaseOrderInfo::getId, vo.getId()); |
| 357 | 357 | ... | ... |