Commit b3493783 authored by chenzhao's avatar chenzhao

修改代码

parent af878b99
......@@ -26,6 +26,14 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
public class Point extends BasicEntity {
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 {
private String chargePersonId ;
/**
* 负责人id
*/
@Column(name="charge_person_name")
private String chargePersonName ;
/**
* 状态:0 未纳入巡检,1 合格;2 不合格;3 漏检
*/
@Column(name="status")
......
......@@ -2365,6 +2365,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>();
wrapper.eq(OrgUsr::getIsDelete, false);
wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey());
wrapper.isNotNull(OrgUsr::getAmosOrgId);
wrapper.likeRight(OrgUsr::getBizOrgCode, company.getBizOrgCode());
return this.baseMapper.selectList(wrapper);
}
......
......@@ -180,12 +180,37 @@ public class PointController extends AbstractBaseController {
newPointClassify.setCategoryName(pointClassify.getCategoryName());
newPointClassify.setCode(pointClassify.getCode());
iPointService.addPointClassifyByPointId(newPointClassify);
}else{
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();//巡检项
for (PointInputItemVo pItemVo : customInputList) {
......@@ -1289,6 +1314,10 @@ public class PointController extends AbstractBaseController {
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();
String bizOrgCode = ((Map<String, Object>) obj).get("bizOrgCode").toString();
String bizOrgName = ((Map<String, Object>) obj).get("bizOrgName").toString();
......
......@@ -50,5 +50,5 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> {
@Modifying
@Transactional
@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 @@
p.*
from p_point p
<where>
1=1
p.is_delete = 0
<if test="pointParams.pointNo != null and pointParams.pointNo != ''">
and p.point_no LIKE CONCAT ('%',#{pointParams.pointNo},'%')
</if>
......@@ -110,7 +110,7 @@
count(*) as number
from p_point
<where>
1=1
is_delete = 0
<if test="pointNo != null and pointNo != ''">
and point_no LIKE CONCAT ('%',#{pointNo},'%')
</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