鞍钢新功能企业筛选

This commit is contained in:
guoshengxiong 2024-10-18 15:48:30 +08:00
parent eb425dd952
commit e5e32b9041
3 changed files with 40 additions and 8 deletions

View File

@ -450,9 +450,6 @@
w1.project_sn = #{projectSn}
</if>
and w1.inService_type = 1
<if test="userEnterpriseId != null and userEnterpriseId != ''">
and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
</if>
<if test="projectSnList != null and projectSnList != ''">
and w1.project_sn in
<foreach collection="projectSnList" item="item" index="index"
@ -464,6 +461,15 @@
AND (w1.enterprise_id = #{supplierEnterpriseId} OR w1.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t WHERE find_in_set(#{projectEnterpriseId}, ancestors) ))
</if>
<if test="userEnterpriseId != null and userEnterpriseId != ''">
AND (FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
<if test="isMain == '1'.toString()">
OR w1.enterprise_id IN ( SELECT enterprise_id FROM
project_enterprise WHERE find_in_set((SELECT id FROM project_enterprise WHERE project_sn =
#{projectSn} and enterprise_id = #{userEnterpriseId}), ancestors))
</if>
)
</if>
</where>
</select>
<select id="selectPresenceWorkerPersonTypeTotal" resultType="java.util.Map" parameterType="java.util.Map">
@ -485,9 +491,6 @@
</if>
and w1.inService_type = 1
<!--and p.create_time>=CONCAT(DATE_FORMAT(now(),"%Y-%m-%d"),' 00:00:00')-->
<if test="userEnterpriseId != null and userEnterpriseId != ''">
and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
</if>
<if test="projectSnList != null and projectSnList != ''">
and w1.project_sn in
<foreach collection="projectSnList" item="item" index="index"
@ -495,6 +498,15 @@
#{item}
</foreach>
</if>
<if test="userEnterpriseId != null and userEnterpriseId != ''">
AND (FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
<if test="isMain == '1'.toString()">
OR w1.enterprise_id IN ( SELECT enterprise_id FROM
project_enterprise WHERE find_in_set((SELECT id FROM project_enterprise WHERE project_sn =
#{projectSn} and enterprise_id = #{userEnterpriseId}), ancestors))
</if>
)
</if>
</where>
</select>
@ -1077,7 +1089,13 @@
and p.create_time &lt; current_date
</if>
<if test="userEnterpriseId != null and userEnterpriseId != ''">
and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
AND (FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
<if test="isMain == '1'.toString()">
OR w1.enterprise_id IN ( SELECT enterprise_id FROM
project_enterprise WHERE find_in_set((SELECT id FROM project_enterprise WHERE project_sn =
#{projectSn} and enterprise_id = #{userEnterpriseId}), ancestors))
</if>
)
</if>
</where>
) tp

View File

@ -53,6 +53,7 @@ import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
import com.zhgd.xmgl.modules.project.entity.bo.ProjectStatisticsCountBo;
import com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper;
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService;
import com.zhgd.xmgl.modules.project.service.IProjectUfaceConfigService;
import com.zhgd.xmgl.modules.video.mapper.AiAnalyseHardWareAlarmRecordMapper;
import com.zhgd.xmgl.modules.worker.entity.*;
@ -264,6 +265,9 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
@Lazy
@Autowired
private IExamTrainRecordService examTrainRecordService;
@Lazy
@Autowired
private IProjectEnterpriseService projectEnterpriseService;
/**
* 人员管理分页
@ -681,6 +685,15 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
public PersonTypeAndEduStatisticsVo selectPersonTypeAndEduStatistics(Map<String, Object> map) {
Map<String, Object> data = new HashMap<>(16);
Map<String, Object> personType = new HashMap<>(16);
String projectSn = MapUtils.getString(map, "projectSn");
String userEnterpriseId = MapUtils.getString(map, "userEnterpriseId");
if (StrUtil.isNotBlank(userEnterpriseId)) {
ProjectEnterprise enterprise = projectEnterpriseService.getOne(new LambdaQueryWrapper<ProjectEnterprise>()
.eq(ProjectEnterprise::getProjectSn, projectSn)
.eq(ProjectEnterprise::getEnterpriseId, userEnterpriseId)
);
map.put("isMain", Optional.ofNullable(enterprise).map(m -> Objects.equals(m.getParentProjectEnterpriseId(), 0L) ? 1 : 0).orElse(null));
}
Map<String, Object> toaltPerson = workerInfoMapper.selectWorkerPersonTypeTotal(map);
Map<String, Object> presencePerson = workerInfoMapper.selectPresenceWorkerPersonTypeTotal(map);
Map<String, Object> attendancePerson = workerInfoMapper.selectAttendanceWorkerPersonTypeTotal(map);

View File

@ -1,6 +1,7 @@
#http.port=30250
http.port=12553
spring.datasource.db1.jdbc-url=jdbc:mysql://127.0.0.1:3306/wisdomsite-angang?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
#spring.datasource.db1.jdbc-url=jdbc:mysql://127.0.0.1:3306/wisdomsite-angang?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
spring.datasource.db1.jdbc-url=jdbc:mysql://127.0.0.1:3306/wisdomsite_angang_deploy?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
spring.datasource.db1.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.db1.username=ENC(XR4C/hvTYCUqudS49Wh/jA==)
spring.datasource.db1.password=ENC(LsKaVL2ycDu+uUNoPndYLA==)