Commit b3493783 authored by chenzhao's avatar chenzhao

修改代码

parent af878b99
...@@ -26,6 +26,14 @@ import cn.afterturn.easypoi.excel.annotation.Excel; ...@@ -26,6 +26,14 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
public class Point extends BasicEntity { public class Point extends BasicEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getChargePersonName() {
return chargePersonName;
}
public void setChargePersonName(String chargePersonName) {
this.chargePersonName = chargePersonName;
}
/** /**
* 参考地址 * 参考地址
*/ */
...@@ -193,6 +201,13 @@ public class Point extends BasicEntity { ...@@ -193,6 +201,13 @@ public class Point extends BasicEntity {
private String chargePersonId ; private String chargePersonId ;
/** /**
* 负责人id
*/
@Column(name="charge_person_name")
private String chargePersonName ;
/**
* 状态:0 未纳入巡检,1 合格;2 不合格;3 漏检 * 状态:0 未纳入巡检,1 合格;2 不合格;3 漏检
*/ */
@Column(name="status") @Column(name="status")
......
...@@ -2365,6 +2365,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -2365,6 +2365,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>(); LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>();
wrapper.eq(OrgUsr::getIsDelete, false); wrapper.eq(OrgUsr::getIsDelete, false);
wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey()); wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey());
wrapper.isNotNull(OrgUsr::getAmosOrgId);
wrapper.likeRight(OrgUsr::getBizOrgCode, company.getBizOrgCode()); wrapper.likeRight(OrgUsr::getBizOrgCode, company.getBizOrgCode());
return this.baseMapper.selectList(wrapper); return this.baseMapper.selectList(wrapper);
} }
......
...@@ -180,11 +180,36 @@ public class PointController extends AbstractBaseController { ...@@ -180,11 +180,36 @@ public class PointController extends AbstractBaseController {
newPointClassify.setCategoryName(pointClassify.getCategoryName()); newPointClassify.setCategoryName(pointClassify.getCategoryName());
newPointClassify.setCode(pointClassify.getCode()); newPointClassify.setCode(pointClassify.getCode());
iPointService.addPointClassifyByPointId(newPointClassify);
}else{ }else{
newPointClassify.setId(pointClassify.getId()); newPointClassify.setId(pointClassify.getId());
List<PointInputItemVo> oldInputItemList =iPointService. queryOldPointInputItem(pointClassify.getPointId()); // 新的巡检项的补集,即需要删除的项
List<PointInputItemVo> newInputItemList = new ArrayList<>();
List<PointInputItemVo> classList = pointClassify.getEquipIputDetailData();
newInputItemList.addAll(classList);
List<Long> ids = new ArrayList<>();
newInputItemList.forEach(item -> {
// PointInputItem pii = iPointInputItemDao.getPointInputItem(pointId, item.getPointItemId());
// if (pii != null) {
ids.add(item.getPointItemId());
// }
});
List<Long> pItemIds = new ArrayList<>();
oldInputItemList.forEach(item -> {
if (!ids.contains(item.getPointItemId())) {
pItemIds.add(item.getPointItemId());
}
});
if (pItemIds.size() > 0) {
iPointInputItemDao.delPointInputItemById(pItemIds);
iRoutePointItemDao.delRoutePointItemByItemId(pItemIds);// 删除p_route_point_item中使用到该项的行
} }
}
iPointService.addPointClassifyByPointId(newPointClassify);
List<PointInputItemVo> customInputList = pointClassify.getEquipIputDetailData();//巡检项 List<PointInputItemVo> customInputList = pointClassify.getEquipIputDetailData();//巡检项
...@@ -1289,6 +1314,10 @@ public class PointController extends AbstractBaseController { ...@@ -1289,6 +1314,10 @@ public class PointController extends AbstractBaseController {
ResponseModel<Object> companyInfo = jcsFeignClient.getCompanyInfo(point.getChargeDeptId()); ResponseModel<Object> companyInfo = jcsFeignClient.getCompanyInfo(point.getChargeDeptId());
FeignClientResult userInfo = jcsFeignClient.selectById(point.getChargePersonId());
Object result = userInfo.getResult();
String personName = ((Map<String, Object>) result).get("personName").toString();
point.setChargePersonName(personName);
Object obj = companyInfo.getResult(); Object obj = companyInfo.getResult();
String bizOrgCode = ((Map<String, Object>) obj).get("bizOrgCode").toString(); String bizOrgCode = ((Map<String, Object>) obj).get("bizOrgCode").toString();
String bizOrgName = ((Map<String, Object>) obj).get("bizOrgName").toString(); String bizOrgName = ((Map<String, Object>) obj).get("bizOrgName").toString();
......
...@@ -50,5 +50,5 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> { ...@@ -50,5 +50,5 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> {
@Modifying @Modifying
@Transactional @Transactional
@Query(value = "DELETE FROM p_point_inputitem WHERE classify_ids IN (?1)", nativeQuery = true) @Query(value = "DELETE FROM p_point_inputitem WHERE classify_ids IN (?1)", nativeQuery = true)
PointInputItem deleteClassifyId(Long classifyId); void deleteClassifyId(Long classifyId);
} }
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
p.* p.*
from p_point p from p_point p
<where> <where>
1=1 p.is_delete = 0
<if test="pointParams.pointNo != null and pointParams.pointNo != ''"> <if test="pointParams.pointNo != null and pointParams.pointNo != ''">
and p.point_no LIKE CONCAT ('%',#{pointParams.pointNo},'%') and p.point_no LIKE CONCAT ('%',#{pointParams.pointNo},'%')
</if> </if>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
count(*) as number count(*) as number
from p_point from p_point
<where> <where>
1=1 is_delete = 0
<if test="pointNo != null and pointNo != ''"> <if test="pointNo != null and pointNo != ''">
and point_no LIKE CONCAT ('%',#{pointNo},'%') and point_no LIKE CONCAT ('%',#{pointNo},'%')
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment