Merge remote-tracking branch 'origin/main'

This commit is contained in:
cwchen 2025-08-29 14:17:25 +08:00
commit 57e93cff84
35 changed files with 292 additions and 75 deletions

View File

@ -17,21 +17,21 @@
<dependencies>
<!-- <dependency>-->
<!-- <groupId>arcsoft</groupId>-->
<!-- <artifactId>arcsoft</artifactId>-->
<!-- <version>3.0</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0-linux.jar</systemPath>-->
<!-- </dependency>-->
<dependency>
<groupId>arcsoft</groupId>
<artifactId>arcsoft</artifactId>
<version>3.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/arcsoft-sdk-face-lin.jar</systemPath>
</dependency>
<dependency>
<groupId>arcsoft</groupId>
<artifactId>arcsoft</artifactId>
<version>3.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar</systemPath>
</dependency>
<!-- <dependency>-->
<!-- <groupId>arcsoft</groupId>-->
<!-- <artifactId>arcsoft</artifactId>-->
<!-- <version>3.0</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar</systemPath>-->
<!-- </dependency>-->
<!-- SpringCloud Openfeign -->
<dependency>

View File

@ -21,6 +21,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 失信人员
@ -112,10 +113,14 @@ public class BmWorkerBlackController extends BaseController {
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false), requiresPermissions = @RequiresPermissions("worker:black:import"))
@PostMapping("/workerBlackImport")
@SysLog(title = "失信人员导入", businessType = OperaType.IMPORT, logType = 0, module = "施工人员->红绿灯管理->失信人员管理", details = "失信人员导入")
public AjaxResult workerEinImport(MultipartFile file, boolean updateSupport) throws Exception {
public AjaxResult workerEinImport(@RequestParam(value = "file") MultipartFile file, boolean updateSupport) throws Exception {
try {
ExcelUtil<BmWorkerBlack> util = new ExcelUtil<>(BmWorkerBlack.class);
List<BmWorkerBlack> workerList = util.importExcel(file.getInputStream());
List<BmWorkerBlack> workerList = util.importExcel(file.getInputStream(),1);
boolean allNull = workerList.stream().allMatch(Objects::isNull);
if (allNull) {
return error("导入文件为空或字段不匹配");
}
String message = service.importWorkerBlack(workerList, updateSupport);
return success(message);
} catch (Exception e) {

View File

@ -1,9 +1,9 @@
package com.bonus.bmw.controller;
import com.bonus.bmw.domain.dto.PmWorkerDto;
import com.bonus.bmw.domain.vo.BmWorkerLight;
import com.bonus.bmw.domain.vo.PmWorker;
import com.bonus.bmw.domain.vo.*;
import com.bonus.bmw.service.BmWorkerLightService;
import com.bonus.bmw.service.impl.BmWorkerLightServiceImpl;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
@ -11,12 +11,15 @@ import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 红绿灯统计
@ -91,4 +94,47 @@ public class BmWorkerLightController extends BaseController {
return getDataTableError(new ArrayList<>());
}
/**
* 红绿灯工程统计导出
*/
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false), requiresPermissions = @RequiresPermissions("worker:light:export"))
@PostMapping("/lightProExport")
@SysLog(title = "红绿灯工程统计导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->红绿灯统计", details = "红绿灯工程统计导出")
public void lightProExport(HttpServletResponse response, BmWorkerLight o) {
try {
List<BmWorkerLight> list = service.getProLightList(o);
ExcelUtil<BmWorkerLight> util = new ExcelUtil<>(BmWorkerLight.class);
util.exportExcel(response, list, "红绿灯工程统计导出");
} catch (Exception e) {
logger.error(e.toString(), e);
}
}
/**
* 红绿灯人员统计导出
*/
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false), requiresPermissions = @RequiresPermissions("worker:light:export"))
@PostMapping("/lightWorkerExport")
@SysLog(title = "红绿灯人员统计导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->红绿灯统计", details = "红绿灯工程统计导出")
public void lightWorkerExport(HttpServletResponse response, BmWorkerLight o) {
try {
try {
List<BmWorkerLight> list = service.getWorkerLightList(o);
List<BmWorkerLightExport> exportList = list.stream()
.map(worker -> {
BmWorkerLightExport export = new BmWorkerLightExport();
BeanUtils.copyProperties(worker, export);
return export;
})
.collect(Collectors.toList());
ExcelUtil<BmWorkerLightExport> util = new ExcelUtil<>(BmWorkerLightExport.class);
util.exportExcel(response, exportList, "红绿灯人员统计导出");
} catch (Exception e) {
logger.error(e.toString(), e);
}
} catch (Exception e) {
logger.error(e.toString(), e);
}
}
}

View File

@ -86,7 +86,7 @@ public class PmProjectController extends BaseController {
if (res>0){
return toAjax(res);
}else {
return error("总工程下存在标段工程");
return error("标段工程被绑定分包请勿删除");
}
} catch (Exception e) {

View File

@ -83,7 +83,7 @@ public class PmSubTeamController extends BaseController {
if (res>0){
return toAjax(res);
}else {
return error();
return error("班组已经出入场请勿删除");
}
} catch (Exception e) {

View File

@ -33,6 +33,8 @@ import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 人员入场
@ -208,10 +210,14 @@ public class PmWorkerController extends BaseController {
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:ein:import"))
@PostMapping("/workerEinImport")
@SysLog(title = "人员信息导入", businessType = OperaType.IMPORT, logType = 0, module = "施工人员->红绿灯管理->入场管理", details = "人员信息导入")
public AjaxResult workerEinImport(MultipartFile file, boolean updateSupport) throws Exception {
public AjaxResult workerEinImport(@RequestParam(value = "file") MultipartFile file, boolean updateSupport) throws Exception {
try {
ExcelUtil<PmWorker> util = new ExcelUtil<>(PmWorker.class);
List<PmWorker> workerList = util.importExcel(file.getInputStream());
List<PmWorker> workerList = util.importExcel(file.getInputStream(),1);
boolean allNull = workerList.stream().allMatch(Objects::isNull);
if (allNull) {
return error("导入文件为空或字段不匹配");
}
String message = service.importWorker(workerList, updateSupport);
return success(message);
} catch (Exception e) {

View File

@ -1,16 +1,19 @@
package com.bonus.bmw.domain.vo;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import lombok.Data;
/**
* 人员黑名单失信人员
*/
@Data
public class BmWorkerBlack {
public class BmWorkerBlack extends BaseEntity {
private static final long serialVersionUID = 1L;
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT, sort = 1)
int sequence;
/**
@ -62,13 +65,13 @@ public class BmWorkerBlack {
/**
* 开始时间
*/
@Excel(name = "开始时间", sort = 8)
@Excel(name = "开始日期", sort = 8)
private String startTime;
/**
* 结束时间
*/
@Excel(name = "结束时间", sort = 9)
@Excel(name = "结束日期", sort = 9)
private String endTime;
/**

View File

@ -1,6 +1,8 @@
package com.bonus.bmw.domain.vo;
import java.util.Date;
import com.bonus.common.core.annotation.Excel;
import lombok.Data;
/**
@ -9,9 +11,14 @@ import lombok.Data;
@Data
public class BmWorkerLight {
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
int sequence;
/**
* 工程
*/
@Excel(name = "工程", type = Excel.Type.EXPORT,sort = 2)
private String proName;
/**
@ -79,23 +86,17 @@ public class BmWorkerLight {
/**
* 在场人员数量
*/
@Excel(name = "在场人员数量", type = Excel.Type.EXPORT,sort = 3)
private String einNum;
/**
* 黄灯数量
*/
@Excel(name = "黄灯数量", type = Excel.Type.EXPORT,sort = 4)
private String yellowNum;
/**
* 绿灯数量
*/
@Excel(name = "绿灯数量", type = Excel.Type.EXPORT,sort = 5)
private String greenNum;
public String getSubComId() {
return subComId;
}
public void setSubComId(String subComId) {
this.subComId = subComId;
}
}

View File

@ -0,0 +1,65 @@
package com.bonus.bmw.domain.vo;
import com.bonus.common.core.annotation.Excel;
import lombok.Data;
/**
* 所有在场人员实时信息表-离场就删除
*/
@Data
public class BmWorkerLightExport {
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
int sequence;
/**
* 姓名
*/
@Excel(name = "姓名", type = Excel.Type.EXPORT,sort = 2)
private String name;
/**
* 身份证号
*/
@Excel(name = "身份证号", type = Excel.Type.EXPORT,sort = 3)
private String idNumber;
/**
* 手机号
*/
@Excel(name = "手机号", type = Excel.Type.EXPORT,sort = 4)
private String phone;
/**
* 工种
*/
@Excel(name = "工种", type = Excel.Type.EXPORT,sort = 5)
private String postName;
/**
* 工程
*/
@Excel(name = "工程", type = Excel.Type.EXPORT,sort = 6)
private String proName;
/**
* 分包
*/
@Excel(name = "分包", type = Excel.Type.EXPORT,sort = 7)
private String subName;
/**
* 班组
*/
@Excel(name = "班组", type = Excel.Type.EXPORT,sort = 8)
private String teamName;
/**
* 1 黄灯 2 绿灯
*/
@Excel(name = "状态", type = Excel.Type.EXPORT,sort = 9,readConverterExp = "1=黄灯,2=绿灯")
private Integer lightStatus;
}

View File

@ -60,7 +60,7 @@ public class PmMainProjectVo {
/**
*工程状态
*/
@Excel(name = "工程状态")
@Excel(name = "工程状态",readConverterExp ="0=在建,1=停工,2=筹建,3=遗留收尾,4=完工")
private String proStatus;
/**

View File

@ -95,7 +95,7 @@ public class PmWorker {
/**
* 入场状态 0未入场 1 已入场
*/
@Excel(name = "入场状态", type = Excel.Type.EXPORT, sort = 8,readConverterExp = "1=入场,0=未入场,2=未入")
@Excel(name = "入场状态", type = Excel.Type.EXPORT, sort = 8,readConverterExp = "1=入场,0=出场,2=出")
private Integer einStatus;
/**

View File

@ -30,4 +30,5 @@ public interface PmSubComMapper {
*/
int delSubCompany(PmSubCompany pmSubCompany);
List<PmSubCompany> selectSubCompanyListAll(PmSubCompany pmSubCompany);
}

View File

@ -27,4 +27,6 @@ public interface PmSubTeamMapper {
int delSubTeam(PmSubTeam pmSubTeam);
List<PmSubTeam> selectSubTeamListAll(PmSubTeam pmSubTeam);
PmSubTeam getSubTeamByName(PmSubTeam pmSubTeam);
}

View File

@ -3,6 +3,7 @@ package com.bonus.bmw.mapper;
import com.bonus.bmw.domain.dto.PmWorkerDto;
import com.bonus.bmw.domain.vo.PmWorker;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -110,4 +111,13 @@ public interface PmWorkerMapper {
* @return
*/
PmWorker getBlackWorkerByNumber(String idNumber);
/**
* 根据身份证查询人员手机号
*
* @param idNumber
* @param phone
* @return
*/
PmWorker getWorkerByPhone(@Param("phone") String phone,@Param("idNumber") String idNumber);
}

View File

@ -3,7 +3,9 @@ package com.bonus.bmw.service.impl;
import com.bonus.bmw.domain.po.BmSubContract;
import com.bonus.bmw.domain.po.PmProject;
import com.bonus.bmw.domain.po.PmSubCompany;
import com.bonus.bmw.domain.vo.BmSubContractVo;
import com.bonus.bmw.domain.vo.PmProjectVo;
import com.bonus.bmw.mapper.BmSubContractMapper;
import com.bonus.bmw.mapper.PmProjectMapper;
import com.bonus.bmw.service.PmProjectService;
import com.bonus.common.core.utils.StringUtils;
@ -29,7 +31,8 @@ public class PmProjectServiceImpl implements PmProjectService {
@Resource
private PmProjectMapper pmProjectMapper;
@Resource
private BmSubContractMapper bmSubContractMapper;
/**
* 标段工程列表
*/
@ -103,6 +106,12 @@ public class PmProjectServiceImpl implements PmProjectService {
*/
@Override
public int delProject(PmProject pmProject) {
BmSubContract bmSubContract = new BmSubContract();
bmSubContract.setProId(pmProject.getId());
List<BmSubContractVo> pmSubTeamContractList = bmSubContractMapper.selectSubContractList(bmSubContract);
if (pmSubTeamContractList.size()>0){
return 0;
}
return pmProjectMapper.delProject(pmProject);
}

View File

@ -81,7 +81,7 @@ public class PmSubComServiceImpl implements PmSubComService {
@Override
public List<PmSubCompany> selectSubCompanyListAll(PmSubCompany pmSubCompany) {
List<PmSubCompany> pmSubCompanyList = pmSubComMapper.selectSubCompanyList(pmSubCompany);
List<PmSubCompany> pmSubCompanyList = pmSubComMapper.selectSubCompanyListAll(pmSubCompany);
if (pmSubCompanyList.size()>0){
//获取分公司下面的项目部
for (PmSubCompany pmSubCompanyNew: pmSubCompanyList) {

View File

@ -1,6 +1,8 @@
package com.bonus.bmw.service.impl;
import com.bonus.bmw.domain.po.PmSubTeam;
import com.bonus.bmw.domain.po.PmSubTeamContract;
import com.bonus.bmw.mapper.PmSubTeamContractMapper;
import com.bonus.bmw.mapper.PmSubTeamMapper;
import com.bonus.bmw.service.PmSubTeamService;
import com.bonus.common.core.utils.StringUtils;
@ -23,6 +25,9 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
@Resource
private PmSubTeamMapper pmSubTeamMapper;
@Resource
private PmSubTeamContractMapper pmSubTeamContractMapper;
/**
* 分包班组信息列表
*/
@ -36,13 +41,20 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
*/
@Override
public int addOrUpdateSubTeam(PmSubTeam pmSubTeam) {
PmSubTeam pmSubTeamOld = pmSubTeamMapper.getSubTeamByName(pmSubTeam);
//存在则删除后新增不存在则新增
if(StringUtils.isNotNull(pmSubTeam.getId())){
if (StringUtils.isNotNull(pmSubTeamOld) && !pmSubTeamOld.getId().equals(pmSubTeam.getId())){
return 0;
}
pmSubTeam.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
pmSubTeam.setUpdateTime(new Date());
return pmSubTeamMapper.updateSubTeam(pmSubTeam);
}else {
if (StringUtils.isNotNull(pmSubTeamOld)){
return 0;
}
pmSubTeam.setCreateUser(SecurityUtils.getLoginUser().getUsername());
pmSubTeam.setCreateTime(new Date());
pmSubTeam.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
@ -56,6 +68,12 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
*/
@Override
public int delSubTeam(PmSubTeam pmSubTeam) {
PmSubTeamContract pmSubTeamContract = new PmSubTeamContract();
pmSubTeamContract.setTeamId(pmSubTeam.getId());
List<PmSubTeamContract> pmSubTeamContractList = pmSubTeamContractMapper.selectSubTeamContractList(pmSubTeamContract);
if (pmSubTeamContractList.size()>0){
return 0;
}
return pmSubTeamMapper.delSubTeam(pmSubTeam);
}

View File

@ -54,7 +54,7 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
//查询合同工资卡是否齐全
List<MapBeanVo> list = mapper.getContractIdAndWageCard(record.getWorkerId());
if("1".equals(list.get(0).getValue()) && "1".equals(list.get(1).getValue())){
if(Integer.parseInt(list.get(0).getValue())>1 && Integer.parseInt(list.get(1).getValue())>1){
//删除合同
int m = contractService.deleteByWorkerId(record.getWorkerId());
//删除实时在场

View File

@ -70,15 +70,20 @@ public class PmWorkerServiceImpl implements PmWorkerService{
@Override
@Transactional
public AjaxResult insert(PmWorker record,List<WebFileDto> fileMsg) throws Exception {
//是否失信人员名单
PmWorker worker2 = mapper.getBlackWorkerByNumber(record.getIdNumber());
if(worker2 != null && worker2.getName() != null){
return new AjaxResult(500, worker2.getName()+"施工人员在失信人员名单,无法入场");
}
// 添加员工时判断员工编号是否已存在
PmWorker worker = mapper.getWorkerByNumber(record.getIdNumber());
if(worker != null && worker.getId() != null){
return new AjaxResult(500, "施工人员身份证已存在,当前系统姓名为"+worker.getName()+"如果想入场请去修改数据即可");
}
//是否失信人员名单
PmWorker worker2 = mapper.getBlackWorkerByNumber(record.getIdNumber());
if(worker2 != null && worker2.getId() != null){
return new AjaxResult(500, worker2.getName()+"施工人员在失信人员名单,无法入场");
// 添加员工时判断员工编号是否已存在
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone(),record.getIdNumber());
if(worker3 != null && worker3.getName() != null){
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为"+worker3.getName()+",请去确认手机号是否有误");
}
record.setCreateUser(SecurityUtils.getLoginUser().getSysUser().getUserName());
int insert = mapper.insert(record);
@ -169,9 +174,14 @@ public class PmWorkerServiceImpl implements PmWorkerService{
public AjaxResult updateByPrimaryKey(PmWorker record,List<WebFileDto> fileMsg) throws Exception {
//是否失信人员名单
PmWorker worker2 = mapper.getBlackWorkerByNumber(record.getIdNumber());
if(worker2 != null && worker2.getId() != null){
if(worker2 != null && worker2.getName() != null){
return new AjaxResult(500, worker2.getName()+"施工人员在失信人员名单,无法入场");
}
// 添加员工时判断员工编号是否已存在
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone(),record.getIdNumber());
if(worker3 != null && worker3.getName() != null){
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为"+worker3.getName()+",请去确认手机号是否有误");
}
//更新基础数据
record.setUpdateUser(SecurityUtils.getLoginUser().getSysUser().getUserName());
int update = mapper.updateByPrimaryKey(record);

View File

@ -62,6 +62,9 @@
<if test="subId!=null and subId!=''">
and bsc.sub_id =#{subId}
</if>
<if test="proId!=null and proId!=''">
and bsc.pro_id =#{proId}
</if>
</select>
<select id="getSubContractBySubContractName" resultType="com.bonus.bmw.domain.po.BmSubContract">
select bsc.id as id,

View File

@ -69,20 +69,17 @@
pp.id as pro_id,
pp.pro_name,
pp.pro_status,
ps.sub_name,
pst.id as team_id,
pst.team_name,
COUNT(DISTINCT bsc.sub_id) AS subNum,
COUNT(DISTINCT bstc.team_id) AS teamNum,
COUNT(DISTINCT bwem.worker_id) AS einNum,
COUNT(DISTINCT bap.worker_id) AS attNum
FROM
pm_project pp
LEFT JOIN bm_sub_contract bsc ON bsc.pro_id = pp.id
AND bsc.is_active = 1
LEFT JOIN pm_sub ps ON ps.id = bsc.sub_id
LEFT JOIN pm_sub_team_contract bstc ON bstc.sub_id = bsc.sub_id
AND bsc.pro_id = bstc.pro_id
AND bstc.is_active = 1
LEFT JOIN pm_sub_team pst ON pst.id = bstc.team_id
LEFT JOIN bm_worker_ein_day_record bwem ON pp.id = bwem.pro_id and bwem.ein_day = #{startDate}
LEFT JOIN bm_att_person bap ON bap.pro_id = pp.id AND bap.att_day = #{startDate}
WHERE
@ -95,7 +92,7 @@
AND pp.org_id = #{orgId}
</if>
GROUP BY
bstc.id
pp.id
</select>
<select id="getTeamAttList" resultMap="BaseResultMap">
@ -117,14 +114,13 @@
AND bsc.pro_id = bstc.pro_id
AND bstc.is_active = 1
LEFT JOIN pm_sub_team pst ON pst.id = bstc.team_id
<!-- LEFT JOIN bm_worker_ein_msg bwem ON pp.id = bwem.pro_id-->
LEFT JOIN bm_worker_ein_day_record bwem ON pp.id = bwem.pro_id and bwem.ein_day = #{startDate}
LEFT JOIN bm_att_person bap ON bap.pro_id = pp.id AND bap.att_day = #{startDate}
LEFT JOIN bm_worker_ein_day_record bwem ON pp.id = bwem.pro_id AND pst.id = bwem.team_id AND bwem.ein_day = #{startDate}
LEFT JOIN bm_att_person bap ON bap.pro_id = pp.id AND pst.id = bap.team_id AND bap.att_day = #{startDate}
WHERE
pp.id = #{proId}
AND pp.is_active = 1
GROUP BY
bstc.id
pst.id
</select>
<select id="getWorkerEinMsgListByDateRange" resultMap="BaseResultMap">
@ -148,7 +144,9 @@
WHERE ein_day &gt;= #{startDate}
AND ein_day &lt;= #{endDate}
and pro_id = #{proId}
and team_id = #{teamId}
<if test="teamId != null and teamId != ''">
and team_id = #{teamId}
</if>
GROUP BY worker_id
) latest ON bwedr.worker_id = latest.worker_id
AND bwedr.ein_day = latest.max_current_day

View File

@ -124,7 +124,7 @@
group_concat(DISTINCT psc.id) AS sub_company_id,
group_concat(DISTINCT pp.pro_name) AS pro_name,
group_concat(DISTINCT psc.sub_company_name) AS sub_company_name,
count(DISTINCT psc.id) AS teamNum,
count(DISTINCT pst.id) AS teamNum,
count(DISTINCT bwem.worker_id) AS einNum,
count(DISTINCT bap.worker_id) AS attNum,
count(DISTINCT IF(bwem.light_status = 1, bwem.worker_id, NULL)) AS yellowNum,
@ -143,8 +143,10 @@
LEFT JOIN pm_sub_team pst ON pst.id = pstc.team_id
AND pst.is_active = 1
LEFT JOIN bm_worker_ein_msg bwem ON pp.id = bwem.pro_id
AND ps.id = bwem.sub_id
AND bwem.is_active = 1
LEFT JOIN bm_att_person bap ON pp.id = bap.pro_id
AND ps.id = bap.sub_id
AND bap.is_active = 1
AND bap.att_day = #{currentDay}
WHERE
@ -152,16 +154,19 @@
<if test="subId != null">
AND ps.id = #{subId}
</if>
<if test="subName != null and subName != ''">
AND locate(#{subName},ps.sub_name)
</if>
GROUP BY
ps.id
<if test="proName != null or subComName != null or proId != null or subCompanyId != null">
) aa
</if>
<where>
<if test="proName != null">
<if test="proName != null and proName != ''">
AND locate(#{proName},aa.pro_name)
</if>
<if test="subComName != null">
<if test="subComName != null and subComName != ''">
AND locate(#{subComName},aa.sub_company_name)
</if>
<if test="proId != null">

View File

@ -14,7 +14,7 @@
<if test="orgName!= null and orgName != ''" >
org_name=#{orgName},
</if>
<if test="isEnable!= null and isEnable != ''" >
<if test="isEnable!= null " >
is_enable=#{isEnable},
</if>
<if test="updateUser!= null and updateUser != ''" >

View File

@ -43,7 +43,7 @@
</select>
<select id="selectPostTypeListAll" resultType="com.bonus.bmw.domain.po.PmPostType">
select id,post_name
from pm_post_type where is_active='1'
from pm_post_type where is_active='1' and is_enable='1'
<if test="postName!=null ">
AND post_name LIKE CONCAT('%', #{postName}, '%')
</if>

View File

@ -168,6 +168,7 @@
from pm_project pp
left join bm_sub_contract bsc on bsc.pro_id = pp.id
where pp.is_active = '1' and bsc.sub_id = #{subId}
GROUP BY pp.id
</select>
<select id="selectProjectListAll" resultType="com.bonus.bmw.domain.vo.PmProjectVo">
select pp.id as id,

View File

@ -59,7 +59,21 @@
psc.update_time as updateTime
from pm_sub_company psc
left join pm_company pc on psc.com_id = pc.id
where pc.is_active = '1' and psc.sub_company_name =#{subCompanyName}
where psc.is_active = '1' and psc.sub_company_name =#{subCompanyName}
</select>
<select id="selectSubCompanyListAll" resultType="com.bonus.bmw.domain.po.PmSubCompany">
select psc.id as id,
psc.com_id as comId,
pc.company_name as companyName,
psc.sub_company_name as subCompanyName,
psc.is_enable as isEnable,
psc.create_user as createUser,
psc.update_user as updateUser,
psc.create_time as createTime,
psc.update_time as updateTime
from pm_sub_company psc
left join pm_company pc on psc.com_id = pc.id
where psc.is_active = '1' and psc.is_enable='1'
</select>
</mapper>

View File

@ -41,6 +41,9 @@
<if test="teamEinStatus!=null and teamEinStatus!= ''">
and team_ein_status LIKE CONCAT('%', #{teamEinStatus}, '%')
</if>
<if test="teamId!=null and teamId!= ''">
and team_id =#{teamId}
</if>
</select>
<select id="getSubTeamContractById" resultType="com.bonus.bmw.domain.po.PmSubTeamContract">
select id,team_id,team_name,sub_id,sub_name,pro_id,pro_name,team_ein_time,team_ein_status,team_exit_time

View File

@ -62,4 +62,10 @@
and pst.sub_id=#{subId}
</if>
</select>
<select id="getSubTeamByName" resultType="com.bonus.bmw.domain.po.PmSubTeam">
select pst.id as id,
pst.team_name as teamName
from pm_sub_team pst
where pst.is_active = '1' and pst.sub_id=#{subId} and pst.team_name = #{teamName}
</select>
</mapper>

View File

@ -102,6 +102,7 @@
bwepr.id,
bwepr.worker_id,
pw.`name`,
pw.`id_number`,
bwepr.pro_name,
bwepr.sub_name,
bwepr.team_name,

View File

@ -245,4 +245,20 @@
WHERE
bwb.id_number = #{idNumber} and bwb.is_remove = 0 and bwb.is_active = 1
</select>
<select id="getWorkerByPhone" resultMap="BaseResultMap">
SELECT
pw.id,
pw.`name`,
pw.phone
FROM
pm_worker pw
WHERE
pw.phone = #{phone} and pw.is_active = 1
<where>
<if test="idNumber != null and idNumber != ''">
AND pw.id_number != #{idNumber}
</if>
</where>
</select>
</mapper>

View File

@ -35,6 +35,7 @@
and bsc.pro_id = #{proId}
</if>
</where>
group by ps.id
</select>
<select id="selectTeam" resultType="com.bonus.bmw.domain.vo.MapBeanVo">

View File

@ -1,10 +1,3 @@
Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name}
_ _
(_) | |
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
__/ | __/ |
|___/ |___/
--------------------------------------------- bns-bmw ---------------------------------------------

View File

@ -7,15 +7,15 @@ spring:
cloud:
nacos:
username: nacos
password: Jjsp@nacos2023
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
namespace: rela_name_system
server-addr: 192.168.0.14:8848
namespace: huadong_realname_local
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
namespace: rela_name_system
server-addr: 192.168.0.14:8848
namespace: huadong_realname_local
# 配置文件格式
file-extension: yml
# 共享配置