This commit is contained in:
马三炮 2025-04-27 18:00:36 +08:00
parent ac26ff3f45
commit 6957a36ecb
13 changed files with 53 additions and 32 deletions

View File

@ -52,7 +52,7 @@ public class TbCompanyPerfVo {
/** /**
* 竣工日期 * 竣工日期
*/ */
@Excel(name = "结束时间", sort = 5) @Excel(name = "竣工日期", sort = 5)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String stopTime; private String stopTime;
@ -66,7 +66,7 @@ public class TbCompanyPerfVo {
/** /**
* 线路建设规模 * 线路建设规模
*/ */
@Excel(name = "线路建设规模", sort = 7) @Excel(name = "线路建设规模(折单公里)", sort = 7)
private String lineScale; private String lineScale;
/** /**

View File

@ -44,7 +44,7 @@ public class TbOtherPeopleVo {
/** /**
* 职工类型 * 职工类型
*/ */
@Excel(name = "养老保险", sort = 10, readConverterExp = "1=正式职工,2=劳务派遣") @Excel(name = "职工类型", sort = 10, readConverterExp = "1=正式职工,2=劳务派遣")
private String workType; private String workType;
/** /**

View File

@ -77,7 +77,7 @@ public class TbSubPeopleVo {
/** /**
* 分包商名称 * 分包商名称
*/ */
@Excel(name = "分包商名称", sort = 1) @Excel(name = "所属分包商", sort = 1)
private String subName; private String subName;
/*** /***

View File

@ -29,7 +29,7 @@ public class TbSubPerfVo {
/** /**
* 项目名称 * 项目名称
*/ */
@Excel(name = "项目名称", sort = 1) @Excel(name = "项目名称(按合同)", sort = 1)
private String proName; private String proName;
/** /**
@ -41,7 +41,7 @@ public class TbSubPerfVo {
/** /**
* 开始时间 * 开始时间
*/ */
@Excel(name = "时间", sort = 4) @Excel(name = "时间", sort = 4)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String startTime; private String startTime;
@ -49,7 +49,7 @@ public class TbSubPerfVo {
/** /**
* 结束时间 * 结束时间
*/ */
@Excel(name = "结束时间", sort = 5) @Excel(name = "竣工时间", sort = 5)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String endTime; private String endTime;

View File

@ -152,14 +152,27 @@ public class TbCompanyPerfServiceImpl implements TbCompanyPerfService {
tbCompanyPerfRelService.delTbCompanyPerRelByPerfId(tbCompanyPerfVo.getId(),"1"); tbCompanyPerfRelService.delTbCompanyPerRelByPerfId(tbCompanyPerfVo.getId(),"1");
//删除关键人服务器图片 //删除关键人服务器图片
if (!tbCompanyPerfRelList.isEmpty()){ if (!tbCompanyPerfRelList.isEmpty()){
for (TbCompanyPerfRelVo TbCompanyPerfRel:tbCompanyPerfRelList) { delTbCompanyPerfRel(tbCompanyPerfRelList);
//获取公司业绩管理附件 }
List<TbFileSourceVo> tbFileSourceList = TbCompanyPerfRel.getTbFileSourceVoList(); }
if (!tbFileSourceList.isEmpty()){
/**
* 删除关键人服务器图片
* @param tbCompanyPerfRelList
*/
public void delTbCompanyPerfRel(List<TbCompanyPerfRelVo> tbCompanyPerfRelList) {
for (TbCompanyPerfRelVo TbCompanyPerfRel:tbCompanyPerfRelList) {
//获取公司业绩管理附件
List<TbFileSourceVo> tbFileSourceList = TbCompanyPerfRel.getTbFileSourceVoList();
if (!tbFileSourceList.isEmpty()){
try {
for (TbFileSourceVo tbFileSource:tbFileSourceList) { for (TbFileSourceVo tbFileSource:tbFileSourceList) {
iSysFileService.deleteFile(tbFileSource.getFilePath()); iSysFileService.deleteFile(tbFileSource.getFilePath());
} }
}catch (Exception e){
log.error("删除图片失败{}",e.getMessage());
} }
} }
} }
} }

View File

@ -44,12 +44,14 @@ public class TbFileSourceServiceImpl implements TbFileSourceService {
@Transactional @Transactional
public void addTbFileSource(List<TbFileSourceVo> tbFileSourceVoList, Long tableId, String tableName) { public void addTbFileSource(List<TbFileSourceVo> tbFileSourceVoList, Long tableId, String tableName) {
String userName = SecurityUtils.getLoginUser().getUsername(); String userName = SecurityUtils.getLoginUser().getUsername();
for (TbFileSourceVo tbFileSourceVo:tbFileSourceVoList) { if (tbFileSourceVoList!=null){
tbFileSourceVo.setTableId(tableId.toString()); for (TbFileSourceVo tbFileSourceVo:tbFileSourceVoList) {
tbFileSourceVo.setTableName(tableName); tbFileSourceVo.setTableId(tableId.toString());
tbFileSourceVo.setUploadUser(userName); tbFileSourceVo.setTableName(tableName);
tbFileSourceVo.setCreateTime(new Date()); tbFileSourceVo.setUploadUser(userName);
tbFileSourceMapper.addTbFileSource(tbFileSourceVo); tbFileSourceVo.setCreateTime(new Date());
tbFileSourceMapper.addTbFileSource(tbFileSourceVo);
}
} }
} }

View File

@ -96,7 +96,7 @@ public class TbKeyPeopleServiceImpl implements TbKeyPeopleServcie {
@Transactional @Transactional
public void updateTbKeyPeople(TbKeyPeopleVo tbKeyPeopleVo) { public void updateTbKeyPeople(TbKeyPeopleVo tbKeyPeopleVo) {
TbKeyPeopleVo tbKeyPeopleOld = tbKeyPeopleMapper.getTbKeyPeopleByIdCard(tbKeyPeopleVo); TbKeyPeopleVo tbKeyPeopleOld = tbKeyPeopleMapper.getTbKeyPeopleByIdCard(tbKeyPeopleVo);
if (StringUtils.isNotNull(tbKeyPeopleOld)){ if (StringUtils.isNotNull(tbKeyPeopleOld) && tbKeyPeopleOld.getId()!=tbKeyPeopleVo.getId()){
throw new ServiceException("身份证已存在"); throw new ServiceException("身份证已存在");
} }
tbKeyPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername()); tbKeyPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());

View File

@ -96,7 +96,7 @@ public class TbOtherPeopleServiceImpl implements TbOtherPeopleService {
@Transactional @Transactional
public void updateTbOtherPeople(TbOtherPeopleVo tbOtherPeopleVo) { public void updateTbOtherPeople(TbOtherPeopleVo tbOtherPeopleVo) {
TbOtherPeopleVo tbOtherPeopleOld = tbOtherPeopleMapper.getTbOtherPeopleByIdCard(tbOtherPeopleVo); TbOtherPeopleVo tbOtherPeopleOld = tbOtherPeopleMapper.getTbOtherPeopleByIdCard(tbOtherPeopleVo);
if (StringUtils.isNotNull(tbOtherPeopleOld)){ if (StringUtils.isNotNull(tbOtherPeopleOld) && tbOtherPeopleVo.getId()!=tbOtherPeopleOld.getId()){
throw new ServiceException("身份证已存在"); throw new ServiceException("身份证已存在");
} }
tbOtherPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername()); tbOtherPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());

View File

@ -77,7 +77,7 @@ public class TbSubPeopleServiceImpl implements TbSubPeopleService {
@Transactional @Transactional
public void addTbSubPeople(TbSubPeopleVo tbSubPeopleVo) { public void addTbSubPeople(TbSubPeopleVo tbSubPeopleVo) {
TbSubPeopleVo tbSubPeopleOld = tbSubPeopleMapper.getTbSubByIdCard(tbSubPeopleVo); TbSubPeopleVo tbSubPeopleOld = tbSubPeopleMapper.getTbSubByIdCard(tbSubPeopleVo);
if (StringUtils.isNotNull(tbSubPeopleOld)){ if (StringUtils.isNotNull(tbSubPeopleOld) ){
throw new ServiceException("身份证号码已存在"); throw new ServiceException("身份证号码已存在");
} }
tbSubPeopleVo.setCreateUser(SecurityUtils.getLoginUser().getUsername()); tbSubPeopleVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
@ -97,7 +97,7 @@ public class TbSubPeopleServiceImpl implements TbSubPeopleService {
@Transactional @Transactional
public void updateTbSubPeople(TbSubPeopleVo tbSubPeopleVo) { public void updateTbSubPeople(TbSubPeopleVo tbSubPeopleVo) {
TbSubPeopleVo tbSubPeopleOld = tbSubPeopleMapper.getTbSubByIdCard(tbSubPeopleVo); TbSubPeopleVo tbSubPeopleOld = tbSubPeopleMapper.getTbSubByIdCard(tbSubPeopleVo);
if (StringUtils.isNotNull(tbSubPeopleOld)){ if (StringUtils.isNotNull(tbSubPeopleOld)&& tbSubPeopleOld.getId()!=tbSubPeopleVo.getId()){
throw new ServiceException("身份证号码已存在"); throw new ServiceException("身份证号码已存在");
} }
tbSubPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername()); tbSubPeopleVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());

View File

@ -97,7 +97,7 @@ public class TbSubServiceImpl implements TbSubService {
@Transactional @Transactional
public void updateTbSub(TbSubVo tbSubVo) { public void updateTbSub(TbSubVo tbSubVo) {
TbSubVo tbSubOld = tbSubMapper.getTbSubBySubName(tbSubVo); TbSubVo tbSubOld = tbSubMapper.getTbSubBySubName(tbSubVo);
if (StringUtils.isNotNull(tbSubOld)){ if (StringUtils.isNotNull(tbSubOld) && tbSubVo.getId()!=tbSubOld.getId()){
throw new ServiceException("分包商名称已存在"); throw new ServiceException("分包商名称已存在");
} }
tbSubVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername()); tbSubVo.setUpdateUser(SecurityUtils.getLoginUser().getUsername());

View File

@ -63,8 +63,11 @@
update_time as updateTime update_time as updateTime
from tb_company_perf where del_flag =0 from tb_company_perf where del_flag =0
<if test="proName != '' and proName != null">and pro_name = #{proName}</if> <if test="proName != '' and proName != null">and pro_name = #{proName}</if>
<if test="startTime != null"> and start_time >= STR_TO_DATE(#{startTime}, '%Y-%m-%d')</if> <if test="voltage != '' and voltage != null">and voltage = #{voltage}</if>
<if test="endTime != null"> and STR_TO_DATE(#{endTime}, '%Y-%m-%d ') >= end_time </if> <if test="startTime != null and test=endTime != null">
and start_time BETWEEN STR_TO_DATE(#{startTime}, '%Y-%m-%d') AND STR_TO_DATE(#{endTime}, '%Y-%m-%d')
</if>
</select> </select>
<select id="getTbCompanyPerfById" resultType="com.bonus.tool.dto.TbCompanyPerfVo"> <select id="getTbCompanyPerfById" resultType="com.bonus.tool.dto.TbCompanyPerfVo">
select id,pro_name,voltage,start_time,end_time,stop_time,station_num,line_scale,contract_rang, select id,pro_name,voltage,start_time,end_time,stop_time,station_num,line_scale,contract_rang,

View File

@ -46,14 +46,14 @@
</delete> </delete>
<select id="getTbSubPeopleList" resultType="com.bonus.tool.dto.TbSubPeopleVo"> <select id="getTbSubPeopleList" resultType="com.bonus.tool.dto.TbSubPeopleVo">
select tsp.id as id ,tsp.user_name as userName,tsp.id_card as idCard,tsp.title as title,tsp.diploma as diploma, select tsp.id as id ,tsp.sub_id as subId,tsp.user_name as userName,tsp.id_card as idCard,tsp.title as title,tsp.diploma as diploma,
tsp.diploma_num as diplomaNum,ts.sub_name as subName tsp.diploma_num as diplomaNum,ts.sub_name as subName
from tb_sub_people tsp from tb_sub_people tsp
left join tb_sub ts on tsp.sub_id = ts.id left join tb_sub ts on tsp.sub_id = ts.id
where del_flag = 0 where tsp.del_flag = 0
<if test="userName != '' and userName != null">and user_name = #{userName}</if> <if test="userName != '' and userName != null">and tsp.user_name = #{userName}</if>
<if test="title != '' and title != null">and title = #{title}</if> <if test="title != '' and title != null">and tsp.title = #{title}</if>
<if test="diploma != '' and diploma != null">and diploma = #{diploma}</if> <if test="diploma != '' and diploma != null">and tsp.diploma = #{diploma}</if>
</select> </select>
<select id="getTbSubPeopleById" resultType="com.bonus.tool.dto.TbSubPeopleVo"> <select id="getTbSubPeopleById" resultType="com.bonus.tool.dto.TbSubPeopleVo">
select id,user_name,id_card,title,diploma,diploma_num select id,user_name,id_card,title,diploma,diploma_num

View File

@ -25,12 +25,14 @@
<if test="endTime != null ">#{endTime},</if> <if test="endTime != null ">#{endTime},</if>
<if test="htRemark != null and htRemark != ''">#{htRemark},</if> <if test="htRemark != null and htRemark != ''">#{htRemark},</if>
<if test="money != null ">#{money},</if> <if test="money != null ">#{money},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="createUser != null ">#{createUser},</if>
<if test="voltage != null ">#{voltage},</if> <if test="voltage != null ">#{voltage},</if>
0 0
</trim> </trim>
</insert> </insert>
<update id="updateTbSubPerf"> <update id="updateTbSubPerf">
update tb_company_perf update tb_sub_perf
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="subId != null">sub_id = #{subId},</if> <if test="subId != null">sub_id = #{subId},</if>
<if test="proName != null">pro_name = #{proName},</if> <if test="proName != null">pro_name = #{proName},</if>
@ -54,8 +56,9 @@
end_time as endTime,ht_remark as htRemark,money as money,voltage as voltage end_time as endTime,ht_remark as htRemark,money as money,voltage as voltage
from tb_sub_perf where del_flag=0 from tb_sub_perf where del_flag=0
<if test="proName != '' and proName != null">and pro_name = #{proName}</if> <if test="proName != '' and proName != null">and pro_name = #{proName}</if>
<if test="startTime != null"> and start_time >= STR_TO_DATE(#{startTime}, '%Y-%m-%d')</if> <if test="startTime != null and test=endTime != null">
<if test="endTime != null"> and STR_TO_DATE(#{endTime}, '%Y-%m-%d ') >= end_time </if> and start_time BETWEEN STR_TO_DATE(#{startTime}, '%Y-%m-%d') AND STR_TO_DATE(#{endTime}, '%Y-%m-%d')
</if>
</select> </select>
<select id="getTbSubPerfById" resultType="com.bonus.tool.dto.TbSubPerfVo"> <select id="getTbSubPerfById" resultType="com.bonus.tool.dto.TbSubPerfVo">
select id as id,sub_id as subId,pro_name as proName,cons_unit as consUnit,start_time as startTime, select id as id,sub_id as subId,pro_name as proName,cons_unit as consUnit,start_time as startTime,