Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 2 years ago
parent
commit
cb384f4f97
  1. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java
  2. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java
  3. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java

@ -268,6 +268,7 @@ public class ImsDutyRecController extends BladeController {
public R queryAnalyseExampleData( AnalyzeDataCondition analyzeDataCondition) {
return iImsAnalyseExampleService.queryAnalyseExampleData(analyzeDataCondition);
}
/**
* 查询分析实例模板
*/
@ -301,9 +302,10 @@ public class ImsDutyRecController extends BladeController {
@PostMapping("/updateAnalyzeExample")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增分析实例", notes = "传入analyseExample")
public R updateAnalyzeExample(AnalyseExample analyseExample) {
public R updateAnalyzeExample(@RequestBody AnalyseExample analyseExample) {
return iImsAnalyseExampleService.updateAnalyseExample(analyseExample);
}
}

17
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java

@ -57,8 +57,7 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl<ImsAnalyseExam
public R queryAnalyseExampleData(AnalyzeDataCondition analyzeDataCondition) {
//设备ID:分析实例编码
R<HzPage<AnalyzeDataList>> analyzeDataByAnalyzeCode = searchClient.getAnalyzeDataByAnalyzeCode(analyzeDataCondition);
return R.data(analyzeDataByAnalyzeCode);
return analyzeDataByAnalyzeCode;
}
/**
@ -105,6 +104,17 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl<ImsAnalyseExam
*/
@Override
public R updateAnalyseExample(AnalyseExample analyseExample) {
QueryWrapper<AnalyseExample> queryWrapper = new QueryWrapper();
if (StringUtils.isNotEmpty(analyseExample.getEquipmentId())){
queryWrapper.lambda().eq(AnalyseExample::getEquipmentId, analyseExample.getEquipmentId());
}
if (ObjectUtils.isNotEmpty(analyseExample.getSiteId())){
queryWrapper.lambda().eq(AnalyseExample::getSiteId, analyseExample.getSiteId());
}
AnalyseExample res = baseMapper.selectOne(queryWrapper.lambda().last("limit 1;"));
if (ObjectUtils.isNotEmpty(res)){
analyseExample.setId(res.getId());
}
this.saveOrUpdate(analyseExample);
return R.success("保存成功");
}
@ -115,6 +125,9 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl<ImsAnalyseExam
if (ObjectUtils.isNotEmpty(analyseExample.getId())) {
queryWrapper.lambda().eq(AnalyseExample::getId, analyseExample.getId());
}
if (ObjectUtils.isNotEmpty(analyseExample.getSiteId())) {
queryWrapper.lambda().eq(AnalyseExample::getSiteId, analyseExample.getSiteId());
}
if (ObjectUtils.isNotEmpty(analyseExample.getSiteName())) {
queryWrapper.lambda().like(AnalyseExample::getSiteName, analyseExample.getSiteName());
}

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -26,7 +26,6 @@ import com.hnac.hzims.operational.duty.vo.ImsDutyRecVO;
import com.hnac.hzims.operational.duty.vo.ImsRecVo;
import com.hnac.hzims.operational.duty.vo.ImsSchedulingVo;
import com.hnac.hzims.operational.duty.wrapper.ImsDutyRecWrapper;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.service.IStationService;
import com.hnac.hzinfo.inspect.plan.feign.IInspectPlanClient;
import com.hnac.hzinfo.inspect.plan.vo.PlanVO;
@ -41,7 +40,6 @@ import org.springblade.flow.core.constant.ProcessConstant;
import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.flow.core.utils.TaskUtil;
import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient;
@ -90,6 +88,8 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
private IInspectPlanClient inspectPlanClient;
@Autowired
private IImsDutyGroupPService imsDutyGroupPService;
@Autowired
private IImsDutyMainPersonService imsDutyMainPersonService;
@Override
@ -335,7 +335,11 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
eq(ImsDutyGroupEntity::getId, entity.getDutyGroupId());
eq(ImsDutyGroupEntity::getManagerId, AuthUtil.getUserId());
}});
if (ObjectUtil.isEmpty(groupEntity)) {
ImsDutyMainPersonEntity personEntity = imsDutyMainPersonService.getOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{
eq(ImsDutyMainPersonEntity::getDutyMainId, entity.getId());
eq(ImsDutyMainPersonEntity::getDutyChargePerson, AuthUtil.getUserId());
}});
if (ObjectUtil.isEmpty(groupEntity)&&ObjectUtil.isEmpty(personEntity)) {
return R.success("您不是该班组负责人,不可交班!");
}

Loading…
Cancel
Save