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")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String stopTime;
@ -66,7 +66,7 @@ public class TbCompanyPerfVo {
/**
* 线路建设规模
*/
@Excel(name = "线路建设规模", sort = 7)
@Excel(name = "线路建设规模(折单公里)", sort = 7)
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;
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -63,8 +63,11 @@
update_time as updateTime
from tb_company_perf where del_flag =0
<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="endTime != null"> and STR_TO_DATE(#{endTime}, '%Y-%m-%d ') >= end_time </if>
<if test="voltage != '' and voltage != null">and voltage = #{voltage}</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 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,

View File

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

View File

@ -25,12 +25,14 @@
<if test="endTime != null ">#{endTime},</if>
<if test="htRemark != null and htRemark != ''">#{htRemark},</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>
0
</trim>
</insert>
<update id="updateTbSubPerf">
update tb_company_perf
update tb_sub_perf
<trim prefix="SET" suffixOverrides=",">
<if test="subId != null">sub_id = #{subId},</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
from tb_sub_perf where del_flag=0
<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="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 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,