Showing
11 changed files
with
196 additions
and
5 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/sample/tracking/GetSampleResultTrackingBo.java
| 1 | 1 | package com.lframework.xingyun.sc.bo.sample.tracking; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 3 | 4 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | 5 | import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| 5 | 6 | import com.lframework.xingyun.sc.entity.SampleResultTracking; |
| ... | ... | @@ -160,6 +161,12 @@ public class GetSampleResultTrackingBo extends BaseBo<SampleResultTracking> { |
| 160 | 161 | private String status; |
| 161 | 162 | |
| 162 | 163 | /** |
| 164 | + * 是否展示审核按钮 | |
| 165 | + */ | |
| 166 | + @ApiModelProperty("是否展示审核按钮") | |
| 167 | + private boolean showExamine; | |
| 168 | + | |
| 169 | + /** | |
| 163 | 170 | * 办事处主管审核意见 |
| 164 | 171 | */ |
| 165 | 172 | @ApiModelProperty("办事处主管审核意见") | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.bo.sample.tracking; |
| 2 | 2 | |
| 3 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | +import com.lframework.starter.common.utils.StringUtil; | |
| 5 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 6 | +import com.lframework.starter.web.core.utils.ApplicationUtil; | |
| 7 | +import com.lframework.starter.web.inner.entity.SysUserDept; | |
| 8 | +import com.lframework.starter.web.inner.service.system.SysUserDeptService; | |
| 4 | 9 | import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| 5 | 10 | import com.lframework.xingyun.sc.entity.SampleResultTracking; |
| 6 | 11 | import com.lframework.starter.common.constants.StringPool; |
| 7 | 12 | import com.lframework.starter.web.core.bo.BaseBo; |
| 8 | 13 | import java.time.LocalDateTime; |
| 9 | 14 | import java.util.List; |
| 15 | +import java.util.stream.Collectors; | |
| 10 | 16 | |
| 11 | 17 | import io.swagger.annotations.ApiModelProperty; |
| 12 | 18 | |
| 13 | 19 | import lombok.Data; |
| 20 | +import org.apache.commons.collections.CollectionUtils; | |
| 14 | 21 | |
| 15 | 22 | /** |
| 16 | 23 | * <p> |
| ... | ... | @@ -161,6 +168,18 @@ public class QuerySampleResultTrackingBo extends BaseBo<SampleResultTracking> { |
| 161 | 168 | private String status; |
| 162 | 169 | |
| 163 | 170 | /** |
| 171 | + * 是否展示审核按钮 | |
| 172 | + */ | |
| 173 | + @ApiModelProperty("是否展示审核按钮") | |
| 174 | + private boolean showExamine; | |
| 175 | + | |
| 176 | + /** | |
| 177 | + * 是否展示编辑按钮 | |
| 178 | + */ | |
| 179 | + @ApiModelProperty("是否展示编辑按钮") | |
| 180 | + private boolean showAudit; | |
| 181 | + | |
| 182 | + /** | |
| 164 | 183 | * 办事处主管审核意见 |
| 165 | 184 | */ |
| 166 | 185 | @ApiModelProperty("办事处主管审核意见") |
| ... | ... | @@ -232,6 +251,16 @@ public class QuerySampleResultTrackingBo extends BaseBo<SampleResultTracking> { |
| 232 | 251 | |
| 233 | 252 | @Override |
| 234 | 253 | protected void afterInit(SampleResultTracking dto) { |
| 235 | - | |
| 254 | + //判断是否可编辑 | |
| 255 | + String deptId = dto.getDeptId(); | |
| 256 | + this.showAudit = false; | |
| 257 | + if (StringUtil.isNotEmpty(deptId)) { | |
| 258 | + SysUserDeptService sysUserDeptService = ApplicationUtil.getBean(SysUserDeptService.class); | |
| 259 | + List<String> userIds = sysUserDeptService.listAllUserByDeptId(deptId, Boolean.TRUE); | |
| 260 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 261 | + String userId = SecurityUtil.getCurrentUser().getId(); | |
| 262 | + this.showAudit = (userIds.contains(userId)); | |
| 263 | + } | |
| 264 | + } | |
| 236 | 265 | } |
| 237 | 266 | } | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.controller.sample; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.io.resource.ClassPathResource; |
| 4 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | |
| 5 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | |
| 6 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | |
| 7 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 4 | 8 | import com.lframework.xingyun.sc.bo.sample.tracking.GetSampleResultTrackingBo; |
| 5 | 9 | import com.lframework.xingyun.sc.bo.sample.tracking.QuerySampleResultTrackingBo; |
| 6 | 10 | import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| ... | ... | @@ -66,6 +70,8 @@ public class SampleResultTrackingController extends DefaultBaseController { |
| 66 | 70 | private SampleResultTrackingService sampleResultTrackingService; |
| 67 | 71 | @Resource |
| 68 | 72 | private SampleFeedbackTrackingDetailService sampleFeedbackTrackingDetailService; |
| 73 | + @Resource | |
| 74 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 69 | 75 | |
| 70 | 76 | |
| 71 | 77 | /** |
| ... | ... | @@ -101,6 +107,14 @@ public class SampleResultTrackingController extends DefaultBaseController { |
| 101 | 107 | vo.setTrackingId(id); |
| 102 | 108 | List<SampleFeedbackTrackingDetail> query = sampleFeedbackTrackingDetailService.query(vo); |
| 103 | 109 | result.setDetailList(query); |
| 110 | + // 获取当前人员的待办任务数据 | |
| 111 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 112 | + if (CollectionUtils.isNotEmpty(flowTaskList)) { | |
| 113 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 114 | + result.setShowExamine(businessIds.contains(result.getId())); | |
| 115 | + } else { | |
| 116 | + result.setShowExamine(false); | |
| 117 | + } | |
| 104 | 118 | |
| 105 | 119 | return InvokeResultBuilder.success(result); |
| 106 | 120 | } |
| ... | ... | @@ -109,7 +123,7 @@ public class SampleResultTrackingController extends DefaultBaseController { |
| 109 | 123 | * 新增 |
| 110 | 124 | */ |
| 111 | 125 | @ApiOperation("新增") |
| 112 | - @HasPermission({"sample:tracking:add"}) | |
| 126 | + @HasPermission({"sample-order:follow-up-form:add"}) | |
| 113 | 127 | @PostMapping |
| 114 | 128 | public InvokeResult<Void> create(@Valid @RequestBody CreateSampleResultTrackingVo vo) { |
| 115 | 129 | ... | ... |
| ... | ... | @@ -33,6 +33,11 @@ public class SampleResultTracking extends BaseEntity implements BaseDto { |
| 33 | 33 | private String deptId; |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | + * 办事处Code | |
| 37 | + */ | |
| 38 | + private String deptCode; | |
| 39 | + | |
| 40 | + /** | |
| 36 | 41 | * 客户ID |
| 37 | 42 | */ |
| 38 | 43 | private String customerId; |
| ... | ... | @@ -147,6 +152,12 @@ public class SampleResultTracking extends BaseEntity implements BaseDto { |
| 147 | 152 | private String status; |
| 148 | 153 | |
| 149 | 154 | /** |
| 155 | + * 是否展示审核按钮 | |
| 156 | + */ | |
| 157 | + @TableField(exist = false) | |
| 158 | + private boolean showExamine; | |
| 159 | + | |
| 160 | + /** | |
| 150 | 161 | * 办事处主管审核意见 |
| 151 | 162 | */ |
| 152 | 163 | private String officeSupervisorOpinion; | ... | ... |
| ... | ... | @@ -31,6 +31,7 @@ import com.lframework.xingyun.sc.service.ledger.ReceiptLedgerInfoService; |
| 31 | 31 | import com.lframework.xingyun.sc.service.order.*; |
| 32 | 32 | import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderService; |
| 33 | 33 | import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipService; |
| 34 | +import com.lframework.xingyun.sc.service.sample.SampleResultTrackingService; | |
| 34 | 35 | import com.lframework.xingyun.sc.service.shipments.ShipmentsOrderInfoService; |
| 35 | 36 | import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService; |
| 36 | 37 | import com.lframework.xingyun.sc.service.shipments.car.CarRequestPlanService; |
| ... | ... | @@ -135,6 +136,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 135 | 136 | private SysDataDicItemService sysDataDicItemService; |
| 136 | 137 | @Resource |
| 137 | 138 | private ProductSampleConfirmationSlipService productSampleConfirmationSlipService; |
| 139 | + @Resource | |
| 140 | + private SampleResultTrackingService sampleResultTrackingService; | |
| 138 | 141 | |
| 139 | 142 | |
| 140 | 143 | |
| ... | ... | @@ -207,6 +210,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 207 | 210 | case "CONFIRMATION_SLIP": |
| 208 | 211 | handleConfirmationSlipData(flowStatus, businessId); |
| 209 | 212 | break; |
| 213 | + case "RESULT_TRACKING": | |
| 214 | + handleResultTrackingData(flowStatus, businessId); | |
| 215 | + break; | |
| 210 | 216 | default: |
| 211 | 217 | break; |
| 212 | 218 | } |
| ... | ... | @@ -854,4 +860,16 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 854 | 860 | productSampleConfirmationSlipService.updateStatus(businessId, "REFUSE"); |
| 855 | 861 | } |
| 856 | 862 | } |
| 863 | + | |
| 864 | + //产品试样跟踪单 | |
| 865 | + private void handleResultTrackingData(String flowStatus, String businessId) { | |
| 866 | + if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) | |
| 867 | + || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { | |
| 868 | + sampleResultTrackingService.updateStatus(businessId, "PASS"); | |
| 869 | + } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) | |
| 870 | + || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus) | |
| 871 | + || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) { | |
| 872 | + sampleResultTrackingService.updateStatus(businessId, "REFUSE"); | |
| 873 | + } | |
| 874 | + } | |
| 857 | 875 | } | ... | ... |
| ... | ... | @@ -21,6 +21,7 @@ import com.lframework.xingyun.sc.service.ledger.FundCoordinationService; |
| 21 | 21 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 22 | 22 | import com.lframework.xingyun.sc.service.purchase.ReplenishmentOrderService; |
| 23 | 23 | import com.lframework.xingyun.sc.service.sample.ProductSampleConfirmationSlipService; |
| 24 | +import com.lframework.xingyun.sc.service.sample.SampleResultTrackingService; | |
| 24 | 25 | import com.lframework.xingyun.sc.vo.customer.credit.*; |
| 25 | 26 | import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderInfoVo; |
| 26 | 27 | import com.lframework.xingyun.sc.vo.purchase.UpdateReplenishmentOrderVo; |
| ... | ... | @@ -51,6 +52,8 @@ public class FlowTaskServiceImpl implements FlowTaskService { |
| 51 | 52 | private SysUserRoleService sysUserRoleService; |
| 52 | 53 | @Resource |
| 53 | 54 | private ProductSampleConfirmationSlipService productSampleConfirmationSlipService; |
| 55 | + @Resource | |
| 56 | + private SampleResultTrackingService sampleResultTrackingService; | |
| 54 | 57 | |
| 55 | 58 | |
| 56 | 59 | @OpLog(type = OtherOpLogType.class, name = "修改客户资信,ID:{}", params = {"#id"}) |
| ... | ... | @@ -340,4 +343,18 @@ public class FlowTaskServiceImpl implements FlowTaskService { |
| 340 | 343 | } |
| 341 | 344 | } |
| 342 | 345 | } |
| 346 | + | |
| 347 | + @Override | |
| 348 | + public void updateResultTrackingMap(Map<String, Object> map) { | |
| 349 | + //流程编码 | |
| 350 | + Object n = map.get("nodeCode"); | |
| 351 | + String nodeCode = String.valueOf(n); | |
| 352 | + //审核意见 | |
| 353 | + Object m = map.get("message"); | |
| 354 | + String message = String.valueOf(m); | |
| 355 | + //主键 | |
| 356 | + Object i = map.get("id"); | |
| 357 | + String id = String.valueOf(i); | |
| 358 | + sampleResultTrackingService.updateExamine(id, nodeCode, message); | |
| 359 | + } | |
| 343 | 360 | } | ... | ... |
| ... | ... | @@ -240,19 +240,19 @@ public class ProductSampleConfirmationSlipServiceImpl extends BaseMpServiceImpl< |
| 240 | 240 | updateWrapper.set(ProductSampleConfirmationSlip::getMarketingDeputyDirectorReview, StringUtil.isBlank(review) ? null : review); |
| 241 | 241 | updateWrapper.set(ProductSampleConfirmationSlip::getMarketingDeputyDirectorOpinion, StringUtil.isBlank(message) ? null : message); |
| 242 | 242 | updateWrapper.eq(ProductSampleConfirmationSlip::getId, id); |
| 243 | - } else if (nodeCode.equals("confirmation_slip_4-")) { | |
| 243 | + } else if (nodeCode.startsWith("confirmation_slip_4-")) { | |
| 244 | 244 | //分厂经营办主管 |
| 245 | 245 | updateWrapper.set(ProductSampleConfirmationSlip::getOfficeManagementSupervisor, StringUtil.isBlank(userId) ? null : userId); |
| 246 | 246 | updateWrapper.set(ProductSampleConfirmationSlip::getOfficeManagementSupervisorReview, StringUtil.isBlank(review) ? null : review); |
| 247 | 247 | updateWrapper.set(ProductSampleConfirmationSlip::getOfficeManagementSupervisorOpinion, StringUtil.isBlank(message) ? null : message); |
| 248 | 248 | updateWrapper.eq(ProductSampleConfirmationSlip::getId, id); |
| 249 | - } else if (nodeCode.equals("confirmation_slip_5-")) { | |
| 249 | + } else if (nodeCode.startsWith("confirmation_slip_5-")) { | |
| 250 | 250 | //分厂品质经理 |
| 251 | 251 | updateWrapper.set(ProductSampleConfirmationSlip::getQualityManager, StringUtil.isBlank(userId) ? null : userId); |
| 252 | 252 | updateWrapper.set(ProductSampleConfirmationSlip::getQualityManagerReview, StringUtil.isBlank(review) ? null : review); |
| 253 | 253 | updateWrapper.set(ProductSampleConfirmationSlip::getQualityManagerOpinion, StringUtil.isBlank(message) ? null : message); |
| 254 | 254 | updateWrapper.eq(ProductSampleConfirmationSlip::getId, id); |
| 255 | - } else if (nodeCode.equals("confirmation_slip_6-")) { | |
| 255 | + } else if (nodeCode.startsWith("confirmation_slip_6-")) { | |
| 256 | 256 | //分厂主管 |
| 257 | 257 | updateWrapper.set(ProductSampleConfirmationSlip::getBranchFactorySupervisor, StringUtil.isBlank(userId) ? null : userId); |
| 258 | 258 | updateWrapper.set(ProductSampleConfirmationSlip::getBranchFactorySupervisorReview, StringUtil.isBlank(review) ? null : review); | ... | ... |
| ... | ... | @@ -3,7 +3,13 @@ package com.lframework.xingyun.sc.impl.sample; |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | |
| 7 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | |
| 8 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | |
| 9 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | |
| 6 | 10 | import com.lframework.starter.common.utils.CollectionUtil; |
| 11 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 12 | +import com.lframework.xingyun.sc.entity.ProductSampleConfirmationSlip; | |
| 7 | 13 | import com.lframework.xingyun.sc.entity.SampleFeedbackTrackingDetail; |
| 8 | 14 | import com.lframework.xingyun.sc.entity.SampleResultTracking; |
| 9 | 15 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| ... | ... | @@ -19,6 +25,7 @@ import com.lframework.starter.web.core.utils.PageHelperUtil; |
| 19 | 25 | import com.lframework.starter.common.utils.Assert; |
| 20 | 26 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 21 | 27 | import com.lframework.xingyun.sc.mappers.SampleFeedbackTrackingDetailMapper; |
| 28 | +import org.apache.commons.collections.CollectionUtils; | |
| 22 | 29 | import org.springframework.transaction.annotation.Transactional; |
| 23 | 30 | import com.lframework.xingyun.sc.mappers.SampleResultTrackingMapper; |
| 24 | 31 | import com.lframework.xingyun.sc.service.sample.SampleResultTrackingService; |
| ... | ... | @@ -29,11 +36,17 @@ import org.springframework.stereotype.Service; |
| 29 | 36 | |
| 30 | 37 | import javax.annotation.Resource; |
| 31 | 38 | import java.util.List; |
| 39 | +import java.util.stream.Collectors; | |
| 32 | 40 | |
| 33 | 41 | @Service |
| 34 | 42 | public class SampleResultTrackingServiceImpl extends BaseMpServiceImpl<SampleResultTrackingMapper, SampleResultTracking> implements SampleResultTrackingService { |
| 43 | + private static final String BPM_FLAG = "RESULT_TRACKING"; | |
| 35 | 44 | @Resource |
| 36 | 45 | private SampleFeedbackTrackingDetailMapper sampleFeedbackTrackingDetailMapper; |
| 46 | + @Resource | |
| 47 | + private FlowInstanceWrapperService flowInstanceWrapperService; | |
| 48 | + @Resource | |
| 49 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 37 | 50 | |
| 38 | 51 | @Override |
| 39 | 52 | public PageResult<SampleResultTracking> query(Integer pageIndex, Integer pageSize, QuerySampleResultTrackingVo vo) { |
| ... | ... | @@ -43,6 +56,19 @@ public class SampleResultTrackingServiceImpl extends BaseMpServiceImpl<SampleRes |
| 43 | 56 | |
| 44 | 57 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 45 | 58 | List<SampleResultTracking> datas = this.query(vo); |
| 59 | + // 获取当前人员的待办任务数据 | |
| 60 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 61 | + if (CollectionUtils.isEmpty(flowTaskList)) { | |
| 62 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 63 | + } | |
| 64 | + List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 65 | + for (SampleResultTracking sampleResultTracking : datas) { | |
| 66 | + if (ids.contains(sampleResultTracking.getId())) { | |
| 67 | + sampleResultTracking.setShowExamine(true); | |
| 68 | + } else { | |
| 69 | + sampleResultTracking.setShowExamine(false); | |
| 70 | + } | |
| 71 | + } | |
| 46 | 72 | |
| 47 | 73 | return PageResultUtil.convert(new PageInfo<>(datas)); |
| 48 | 74 | } |
| ... | ... | @@ -118,6 +144,9 @@ public class SampleResultTrackingServiceImpl extends BaseMpServiceImpl<SampleRes |
| 118 | 144 | |
| 119 | 145 | OpLogUtil.setVariable("id", data.getId()); |
| 120 | 146 | OpLogUtil.setExtra(vo); |
| 147 | + //开启审核 | |
| 148 | + SampleResultTracking result = getBaseMapper().findById(vo.getId()); | |
| 149 | + flowInstanceWrapperService.startInstance(BPM_FLAG, result.getId(), BPM_FLAG, result); | |
| 121 | 150 | } |
| 122 | 151 | |
| 123 | 152 | @OpLog(type = OtherOpLogType.class, name = "删除产品试样结果跟踪单,ID:{}", params = {"#id"}) |
| ... | ... | @@ -127,4 +156,48 @@ public class SampleResultTrackingServiceImpl extends BaseMpServiceImpl<SampleRes |
| 127 | 156 | |
| 128 | 157 | getBaseMapper().deleteById(id); |
| 129 | 158 | } |
| 159 | + | |
| 160 | + @OpLog(type = OtherOpLogType.class, name = "修改状态,ID:{}", params = {"#id"}) | |
| 161 | + @Transactional(rollbackFor = Exception.class) | |
| 162 | + @Override | |
| 163 | + public void updateStatus(String id, String status) { | |
| 164 | + | |
| 165 | + SampleResultTracking data = getBaseMapper().selectById(id); | |
| 166 | + if (ObjectUtil.isNull(data)) { | |
| 167 | + throw new DefaultClientException("产品试样结果跟踪单不存在!"); | |
| 168 | + } | |
| 169 | + | |
| 170 | + LambdaUpdateWrapper<SampleResultTracking> updateWrapper = Wrappers.lambdaUpdate(SampleResultTracking.class) | |
| 171 | + .set(SampleResultTracking::getStatus, status) | |
| 172 | + .eq(SampleResultTracking::getId, id); | |
| 173 | + | |
| 174 | + getBaseMapper().update(updateWrapper); | |
| 175 | + | |
| 176 | + } | |
| 177 | + | |
| 178 | + @Override | |
| 179 | + public void updateExamine(String id, String nodeCode, String message) { | |
| 180 | + SampleResultTracking data = getBaseMapper().selectById(id); | |
| 181 | + if (ObjectUtil.isNull(data)) { | |
| 182 | + throw new DefaultClientException("产品试样结果跟踪单不存在!"); | |
| 183 | + } | |
| 184 | + LambdaUpdateWrapper<SampleResultTracking> updateWrapper = Wrappers.lambdaUpdate(SampleResultTracking.class); | |
| 185 | + if ("result_tracking_1".equals(nodeCode)) { | |
| 186 | + updateWrapper.set(SampleResultTracking::getOfficeSupervisorOpinion, message); | |
| 187 | + updateWrapper.eq(SampleResultTracking::getId, id); | |
| 188 | + } else if (nodeCode.startsWith("result_tracking_2-")) { | |
| 189 | + updateWrapper.set(SampleResultTracking::getQualitySupervisorOpinion, message); | |
| 190 | + updateWrapper.eq(SampleResultTracking::getId, id); | |
| 191 | + } else if (nodeCode.startsWith("result_tracking_3-")) { | |
| 192 | + updateWrapper.set(SampleResultTracking::getQualityManagerOpinion, message); | |
| 193 | + updateWrapper.eq(SampleResultTracking::getId, id); | |
| 194 | + } else if (nodeCode.startsWith("result_tracking_4-")) { | |
| 195 | + updateWrapper.set(SampleResultTracking::getOperationsDepartmentSupervisorOpinion, message); | |
| 196 | + updateWrapper.eq(SampleResultTracking::getId, id); | |
| 197 | + } else if (nodeCode.startsWith("result_tracking_5-")) { | |
| 198 | + updateWrapper.set(SampleResultTracking::getMarketingDeputyDirectorOpinion, message); | |
| 199 | + updateWrapper.eq(SampleResultTracking::getId, id); | |
| 200 | + } | |
| 201 | + getBaseMapper().update(updateWrapper); | |
| 202 | + } | |
| 130 | 203 | } | ... | ... |
| ... | ... | @@ -72,4 +72,21 @@ public interface SampleResultTrackingService extends BaseMpService<SampleResultT |
| 72 | 72 | * @return |
| 73 | 73 | */ |
| 74 | 74 | void deleteById(String id); |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 修改状态 | |
| 78 | + * | |
| 79 | + * @param id 主键 | |
| 80 | + * @param status 状态 | |
| 81 | + */ | |
| 82 | + void updateStatus(String id, String status); | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 更新审核意见 | |
| 86 | + * | |
| 87 | + * @param id 主键 | |
| 88 | + * @param nodeCode 节点 | |
| 89 | + * @param message 审核意见 | |
| 90 | + */ | |
| 91 | + void updateExamine(String id, String nodeCode, String message); | |
| 75 | 92 | } | ... | ... |
| ... | ... | @@ -4,6 +4,8 @@ |
| 4 | 4 | |
| 5 | 5 | <resultMap id="SampleResultTracking" type="com.lframework.xingyun.sc.entity.SampleResultTracking"> |
| 6 | 6 | <id column="id" property="id"/> |
| 7 | + <result column="dept_id" property="deptId"/> | |
| 8 | + <result column="dept_code" property="deptCode"/> | |
| 7 | 9 | <result column="customer_id" property="customerId"/> |
| 8 | 10 | <result column="customer_name" property="customerName"/> |
| 9 | 11 | <result column="workshop_id" property="workshopId"/> |
| ... | ... | @@ -40,6 +42,8 @@ |
| 40 | 42 | <sql id="SampleResultTracking_sql"> |
| 41 | 43 | SELECT |
| 42 | 44 | tb.id, |
| 45 | + tb.dept_id, | |
| 46 | + sd.code AS dept_code, | |
| 43 | 47 | tb.customer_id, |
| 44 | 48 | cu.name AS customer_name, |
| 45 | 49 | tb.workshop_id, |
| ... | ... | @@ -75,6 +79,7 @@ |
| 75 | 79 | left join base_data_customer as cu on cu.id = tb.customer_id |
| 76 | 80 | left join base_data_workshop as ws on ws.id = tb.workshop_id |
| 77 | 81 | left join purchase_order_info as poi on poi.id = tb.order_id |
| 82 | + left join sys_dept as sd on sd.id = tb.dept_id | |
| 78 | 83 | </sql> |
| 79 | 84 | |
| 80 | 85 | <select id="query" resultMap="SampleResultTracking"> | ... | ... |
No preview for this file type