Commit fa31f15f authored by zhangsen's avatar zhangsen

巡检模块代码物理合并3

parent e7f42a7d
......@@ -2522,6 +2522,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper.eq(OrgUsr::getIsDelete, false);
wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey());
wrapper.isNotNull(OrgUsr::getAmosOrgId);
wrapper.ne(OrgUsr::getAmosOrgId, "");
wrapper.likeRight(OrgUsr::getBizOrgCode, company.getBizOrgCode());
return this.baseMapper.selectList(wrapper);
}
......
......@@ -76,7 +76,10 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
public List<WarehouseStructure> gettree(Long warehouseId, String bizOrgCode, String buildingId) {
List<WarehouseStructure> list = new ArrayList<>();
if (!StringUtils.isEmpty(buildingId)){ //buildId如果不为空,则为巡检点业务所调用入口
Map<String, String> map = formInstanceMapper.getChildListdate(Long.parseLong(buildingId));
Map<String, String> map = new HashMap<>();
List<String> list1 = formInstanceMapper.selectChildListdate(Long.parseLong(buildingId));
String join = String.join(",", list1);
map.put("ids", join);
List<String> strings = new ArrayList<>();
if(map.get("ids")!=null && !map.get("ids").equals("")){
String ids = map.get("ids");
......
......@@ -27,10 +27,10 @@ public interface IPointDao extends BaseDao<Point, Long> {
Optional<Point> findById(Long id);
@Query(value = "select * from p_point where point_no = (?1) and is_delete =0 and if(?2 is null, 1 = 1 , id = ?2)", nativeQuery = true)
@Query(value = "select * from p_point where point_no = (?1) and is_delete =0 and if(?2 is null, 1 = 1 , id != ?2)", nativeQuery = true)
List<Point> findByNo(String pointNo, String id);
@Query(value = "select * from p_point where name = (?1) and is_delete =0 and if(?2 is null, 1 = 1 , id = ?2)", nativeQuery = true)
@Query(value = "select * from p_point where name = (?1) and is_delete =0 and if(?2 is null, 1 = 1 , id != ?2)", nativeQuery = true)
List<Point> findByName(String name, String id);
}
......@@ -208,13 +208,13 @@
ppi.order_no as pOrderNo,
ppi.id as pointItemId,
ppc.name as classifyNames,
ppc.id as classifyIds,
prpi.id as routePointItemId
ppc.id as classifyIds
<!-- ,prpi.id as routePointItemId-->
FROM
p_point_classify ppc
LEFT JOIN p_point_inputitem ppi ON ppi.classify_ids = ppc.id
LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id
lEFT JOIN p_route_point_item prpi ON prpi.point_input_item_id = pii.id
<!-- lEFT JOIN p_route_point_item prpi ON prpi.point_input_item_id = pii.id-->
WHERE pii.is_delete = '0'
<if test="classifyId!=null and classifyId !='' "> AND ppc.id = #{classifyId}</if>
<!-- <if test="pointId!=null and pointId !='' "> AND ppc.point_id = #{pointId}</if>-->
......
......@@ -22,15 +22,15 @@
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if test="beginDate!=null and endDate!=null">
<if test="beginDate!=null and endDate!=null and endDate != '' and endDate == null">
and a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate==null and endDate != null">
<if test="beginDate==null and endDate != null and endDate != ''">
AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate!=null and endDate == null">
<if test="beginDate!=null and beginDate != '' and endDate == null">
and a.begin_Time <![CDATA[>=]]> #{beginDate}
</if>
......@@ -42,7 +42,7 @@
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if test="bizOrgCode!=null"> and a.org_Code like concat (#{bizOrgCode},"%")</if>
<if test="searchDay!=null and searchDay != '' searchDay == 1">
<if test="searchDay!=null and searchDay != '' and searchDay == 1">
and a.`check_date` = curdate()
</if>
......@@ -104,15 +104,15 @@
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if test="beginDate!=null and endDate!=null">
<if test="beginDate!=null and endDate!=null and endDate != '' and endDate == null">
and a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate==null and endDate != null">
<if test="beginDate==null and endDate != null and endDate != ''">
AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate!=null and endDate == null">
<if test="beginDate!=null and beginDate != '' and endDate == null">
and a.begin_Time <![CDATA[>=]]> #{beginDate}
</if>
......@@ -125,7 +125,7 @@
<if test="orgCode!=null">
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if test="searchDay!=null and searchDay != '' searchDay == 1">
<if test="searchDay!=null and searchDay != '' and searchDay == 1">
and a.`check_date` = curdate()
</if>
</where>
......
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