增加检测第一步与最后一步需要上传图片
This commit is contained in:
parent
b2682976d5
commit
b6c5d5515b
@ -154,4 +154,15 @@ public class InspectionInfoController extends BaseController {
|
|||||||
public CommonResult getWeorkNodesById(Integer inspectionId) {
|
public CommonResult getWeorkNodesById(Integer inspectionId) {
|
||||||
return success(inspectionInfoService.getWeorkNodesById(inspectionId));
|
return success(inspectionInfoService.getWeorkNodesById(inspectionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否需要上传图片
|
||||||
|
* @param inspectionId
|
||||||
|
* @param workNodeId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("orImages")
|
||||||
|
public CommonResult orImages(Integer inspectionId, String workNodeId){
|
||||||
|
return success(inspectionWorkNodeService.orImages(inspectionId,workNodeId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,4 +33,6 @@ public interface IInspectionWorkNodeService extends IService<InspectionWorkNode>
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId);
|
List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId);
|
||||||
|
|
||||||
|
boolean orImages(Integer inspectionId, String workNodeId);
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
private PermissionService permissionService;
|
private PermissionService permissionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RoleService roleService;
|
private RoleService roleService;
|
||||||
|
@Autowired
|
||||||
|
private IInspectionWorkNodeService inspectionWorkNodeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, PartnerListQuery partnerListQuery) {
|
public IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, PartnerListQuery partnerListQuery) {
|
||||||
@ -1479,6 +1481,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
res.setGoodsImage(goods.getImage());
|
res.setGoodsImage(goods.getImage());
|
||||||
LambdaQueryWrapper<InspectionStepInfo> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<InspectionStepInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(InspectionStepInfo::getInspectionInfoId,inspectionInfoId).orderByAsc(InspectionStepInfo::getStepNum);
|
queryWrapper.eq(InspectionStepInfo::getInspectionInfoId,inspectionInfoId).orderByAsc(InspectionStepInfo::getStepNum);
|
||||||
|
queryWrapper.orderBy(true, false, InspectionStepInfo::getId);
|
||||||
List<InspectionStepInfo> list = stepInfoService.list(queryWrapper);
|
List<InspectionStepInfo> list = stepInfoService.list(queryWrapper);
|
||||||
if (CollectionUtil.isNotEmpty(list)){
|
if (CollectionUtil.isNotEmpty(list)){
|
||||||
res.setStepInfos(list);
|
res.setStepInfos(list);
|
||||||
@ -1731,7 +1734,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
AdminUserDO buyUser = userService.getUser(inspectionInfo.getUserId());
|
AdminUserDO buyUser = userService.getUser(inspectionInfo.getUserId());
|
||||||
PartnerWorker worker = partnerWorkerService.getById(inspectionInfo.getWorkId());
|
PartnerWorker worker = partnerWorkerService.getById(inspectionInfo.getWorkId());
|
||||||
ShopMallPartners partner = this.getById(orderInfo.getPartnerId());
|
ShopMallPartners partner = this.getById(orderInfo.getPartnerId());
|
||||||
AdminUserDO workerUser = userService.getUser(worker.getUserId());
|
AdminUserDO workerUser = userService.getUser(inspectionInfo.getWorkId());
|
||||||
String inspection_work_order = configService.selectConfigByKey("inspection_work_order");
|
String inspection_work_order = configService.selectConfigByKey("inspection_work_order");
|
||||||
String payType = "未知";
|
String payType = "未知";
|
||||||
if (StringUtils.isNotEmpty(orderInfo.getPayType())){
|
if (StringUtils.isNotEmpty(orderInfo.getPayType())){
|
||||||
|
@ -239,7 +239,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
InspectionStepInfo stepInfo = new InspectionStepInfo();
|
InspectionStepInfo stepInfo = new InspectionStepInfo();
|
||||||
stepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId())));
|
stepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId())));
|
||||||
stepInfo.setTitle("检测开始");
|
stepInfo.setTitle("检测开始");
|
||||||
stepInfo.setContent("检测开始");
|
|
||||||
stepInfo.setCreateTime(new Date());
|
stepInfo.setCreateTime(new Date());
|
||||||
stepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId())));
|
stepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId())));
|
||||||
boolean save = inspectionStepInfoService.save(stepInfo);
|
boolean save = inspectionStepInfoService.save(stepInfo);
|
||||||
|
@ -45,6 +45,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工接单
|
* 员工接单
|
||||||
|
*
|
||||||
* @param inspectionId
|
* @param inspectionId
|
||||||
* @param workNodeId
|
* @param workNodeId
|
||||||
*/
|
*/
|
||||||
@ -90,8 +91,11 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
|
|
||||||
InspectionStepInfo inspectionStepInfo = new InspectionStepInfo();
|
InspectionStepInfo inspectionStepInfo = new InspectionStepInfo();
|
||||||
inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId())));
|
inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId())));
|
||||||
inspectionStepInfo.setTitle(project.getProjectName() + "项目开始检测");
|
if (ObjectUtil.isNotNull(project)) {
|
||||||
inspectionStepInfo.setContent(project.getProjectName() + "项目开始检测");
|
inspectionStepInfo.setTitle(project.getProjectName() + "项目开始检测");
|
||||||
|
}else {
|
||||||
|
inspectionStepInfo.setTitle("项目检测开始");
|
||||||
|
}
|
||||||
inspectionStepInfo.setCreateTime(DateUtil.date());
|
inspectionStepInfo.setCreateTime(DateUtil.date());
|
||||||
inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(workerUser.getId())));
|
inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(workerUser.getId())));
|
||||||
inspectionStepService.save(inspectionStepInfo);
|
inspectionStepService.save(inspectionStepInfo);
|
||||||
@ -141,9 +145,18 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
//根据projectId查询项目名称
|
//根据projectId查询项目名称
|
||||||
DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper<DlInspectionProject>()
|
DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper<DlInspectionProject>()
|
||||||
.eq(DlInspectionProject::getId, workNode.getProjectId()));
|
.eq(DlInspectionProject::getId, workNode.getProjectId()));
|
||||||
String stepTitle = project.getProjectName() + "项目检测完成";
|
String stepTitle = "";
|
||||||
inspectionStepInfo.setTitle(stepTitle);
|
if(ObjectUtil.isNotNull(project)) {
|
||||||
inspectionStepInfo.setContent(stepTitle);
|
inspectionStepInfo.setTitle(project.getProjectName() + "项目检测完成");
|
||||||
|
}else {
|
||||||
|
inspectionStepInfo.setTitle("项目检测完成");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(inspectionWorkNode.getRemark())) {
|
||||||
|
inspectionStepInfo.setContent(inspectionWorkNode.getRemark());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(inspectionWorkNode.getDealImages())) {
|
||||||
|
inspectionStepInfo.setImages(inspectionWorkNode.getDealImages());
|
||||||
|
}
|
||||||
inspectionStepInfo.setCreateTime(DateUtil.date());
|
inspectionStepInfo.setCreateTime(DateUtil.date());
|
||||||
inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId())));
|
inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId())));
|
||||||
inspectionStepService.save(inspectionStepInfo);
|
inspectionStepService.save(inspectionStepInfo);
|
||||||
@ -162,7 +175,6 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
inspectionStepInfo = new InspectionStepInfo();
|
inspectionStepInfo = new InspectionStepInfo();
|
||||||
inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(workNode.getInspectionInfoId())));
|
inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(workNode.getInspectionInfoId())));
|
||||||
inspectionStepInfo.setTitle(stepTitle);
|
inspectionStepInfo.setTitle(stepTitle);
|
||||||
inspectionStepInfo.setContent(stepTitle);
|
|
||||||
inspectionStepInfo.setCreateTime(DateUtil.date());
|
inspectionStepInfo.setCreateTime(DateUtil.date());
|
||||||
inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId())));
|
inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId())));
|
||||||
inspectionStepService.save(inspectionStepInfo);
|
inspectionStepService.save(inspectionStepInfo);
|
||||||
@ -190,6 +202,21 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
return baseMapper.getWeorkNodesById(inspectionId);
|
return baseMapper.getWeorkNodesById(inspectionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean orImages(Integer inspectionId, String workNodeId) {
|
||||||
|
/*获取当前节点*/
|
||||||
|
InspectionWorkNode workNode = getById(workNodeId);
|
||||||
|
if (workNode.getOrderNum() == 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/*获取所有流程*/
|
||||||
|
List<InspectionWorkNode> workNodes = getWeorkNodesById(inspectionId);
|
||||||
|
if (!hasNextNode(workNodes, workNode)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目
|
* 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目
|
||||||
*
|
*
|
||||||
@ -211,9 +238,10 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 退办理
|
* 退办理
|
||||||
|
*
|
||||||
* @param inspectionWorkNode
|
* @param inspectionWorkNode
|
||||||
*/
|
*/
|
||||||
public void returnInspectionInfo(InspectionWorkNode inspectionWorkNode){
|
public void returnInspectionInfo(InspectionWorkNode inspectionWorkNode) {
|
||||||
// 获取当前登录人
|
// 获取当前登录人
|
||||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
//通过工单id获取工单
|
//通过工单id获取工单
|
||||||
@ -227,7 +255,12 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
InspectionStepInfo stepInfo = new InspectionStepInfo();
|
InspectionStepInfo stepInfo = new InspectionStepInfo();
|
||||||
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
|
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
|
||||||
stepInfo.setTitle("退办理");
|
stepInfo.setTitle("退办理");
|
||||||
stepInfo.setContent("退办理");
|
if (ObjectUtil.isNotEmpty(inspectionWorkNode.getRemark())) {
|
||||||
|
stepInfo.setContent(inspectionWorkNode.getRemark());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(inspectionWorkNode.getDealImages())) {
|
||||||
|
stepInfo.setImages(inspectionWorkNode.getDealImages());
|
||||||
|
}
|
||||||
stepInfo.setCreateTime(DateUtil.date());
|
stepInfo.setCreateTime(DateUtil.date());
|
||||||
stepInfo.setCreator(Integer.parseInt(loginUser.getId().toString()));
|
stepInfo.setCreator(Integer.parseInt(loginUser.getId().toString()));
|
||||||
inspectionStepService.save(stepInfo);
|
inspectionStepService.save(stepInfo);
|
||||||
@ -235,7 +268,6 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
stepInfo = new InspectionStepInfo();
|
stepInfo = new InspectionStepInfo();
|
||||||
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
|
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
|
||||||
stepInfo.setTitle("检测结束");
|
stepInfo.setTitle("检测结束");
|
||||||
stepInfo.setContent("检测结束");
|
|
||||||
stepInfo.setCreateTime(DateUtil.date());
|
stepInfo.setCreateTime(DateUtil.date());
|
||||||
stepInfo.setCreator(Integer.parseInt(loginUser.getId().toString()));
|
stepInfo.setCreator(Integer.parseInt(loginUser.getId().toString()));
|
||||||
inspectionStepService.save(stepInfo);
|
inspectionStepService.save(stepInfo);
|
||||||
@ -248,6 +280,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 重审
|
* 重审
|
||||||
|
*
|
||||||
* @param inspectionWorkNode
|
* @param inspectionWorkNode
|
||||||
*/
|
*/
|
||||||
public void retrial(InspectionWorkNode inspectionWorkNode) {
|
public void retrial(InspectionWorkNode inspectionWorkNode) {
|
||||||
@ -272,7 +305,12 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
|||||||
InspectionStepInfo stepInfo = new InspectionStepInfo();
|
InspectionStepInfo stepInfo = new InspectionStepInfo();
|
||||||
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
|
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
|
||||||
stepInfo.setTitle("重审");
|
stepInfo.setTitle("重审");
|
||||||
stepInfo.setContent("重审");
|
if (ObjectUtil.isNotEmpty(inspectionWorkNode.getRemark())) {
|
||||||
|
stepInfo.setContent(inspectionWorkNode.getRemark());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(inspectionWorkNode.getDealImages())) {
|
||||||
|
stepInfo.setImages(inspectionWorkNode.getDealImages());
|
||||||
|
}
|
||||||
inspectionStepService.save(stepInfo);
|
inspectionStepService.save(stepInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user