Commit 8f3d5c0f authored by 鲁鸿波's avatar 鲁鸿波

人员台账添加承包商查询

监督统计bug修改
parent 85266c1a
...@@ -148,6 +148,16 @@ public class TContractorInfoController extends SuperController ...@@ -148,6 +148,16 @@ public class TContractorInfoController extends SuperController
return baseResponse; return baseResponse;
} }
@ApiOperation(value = "获取承包商信息下拉选择列表", notes = "List TContractorInfo with page")
@GetMapping(value = "/selectALL")
public BaseResponse<BaseResponseList<TContractorInfo>> selectAll(TContractorInfoParam param){
BaseResponse<BaseResponseList<TContractorInfo>>baseResponse=new BaseResponse<>();
BaseResponseList<TContractorInfo> baseResponseList=new BaseResponseList<>();
baseResponseList.setData(tContractorInfoService.selectAll(param));
baseResponse.setData(baseResponseList);
return baseResponse;
}
@ApiOperation(value = "获取 承包商信息 列表", notes = "List TContractorInfo all") @ApiOperation(value = "获取 承包商信息 列表", notes = "List TContractorInfo all")
@GetMapping(value = "/datas") @GetMapping(value = "/datas")
public BaseResponse<BaseResponseList<TContractorInfo>>listAllEntity(TContractorInfoParam param){ public BaseResponse<BaseResponseList<TContractorInfo>>listAllEntity(TContractorInfoParam param){
......
package com.testor.module.contractor.ledger.dao; package com.testor.module.contractor.ledger.dao;
import com.testor.module.contractor.ledger.model.domain.TContractorInfo; import com.testor.module.contractor.ledger.model.domain.TContractorInfo;
import com.testor.module.contractor.ledger.model.dto.TContractorInfoParam;
import com.tongtech.tfw.backend.common.models.supers.SuperDao; import com.tongtech.tfw.backend.common.models.supers.SuperDao;
import java.util.List;
/** /**
* 承包商信息Mapper接口 * 承包商信息Mapper接口
* *
...@@ -10,4 +14,7 @@ import com.tongtech.tfw.backend.common.models.supers.SuperDao; ...@@ -10,4 +14,7 @@ import com.tongtech.tfw.backend.common.models.supers.SuperDao;
*/ */
public interface TContractorInfoDao extends SuperDao<TContractorInfo> public interface TContractorInfoDao extends SuperDao<TContractorInfo>
{ {
List<TContractorInfo> selectAll(TContractorInfoParam param);
} }
...@@ -244,6 +244,13 @@ public class TContractorPerson extends SuperModel ...@@ -244,6 +244,13 @@ public class TContractorPerson extends SuperModel
@TableField("org_id") @TableField("org_id")
private String orgId; private String orgId;
/**
* 所属承包商名称
*/
@ApiModelProperty(value = "所属承包商名称")
@TableField(exist = false)
private String infoDesignation;
public static final String ID ="id"; public static final String ID ="id";
public static final String INFO_ID ="info_id"; public static final String INFO_ID ="info_id";
public static final String NAME ="name"; public static final String NAME ="name";
......
...@@ -3,6 +3,7 @@ package com.testor.module.contractor.ledger.service; ...@@ -3,6 +3,7 @@ package com.testor.module.contractor.ledger.service;
import com.testor.module.contractor.ledger.model.domain.TContractorInfo; import com.testor.module.contractor.ledger.model.domain.TContractorInfo;
import com.testor.module.contractor.ledger.model.dto.TContractorInfoDelParam; import com.testor.module.contractor.ledger.model.dto.TContractorInfoDelParam;
import com.testor.module.contractor.ledger.model.dto.TContractorInfoParam;
import com.tongtech.tfw.backend.common.models.supers.SuperService; import com.tongtech.tfw.backend.common.models.supers.SuperService;
import java.util.List; import java.util.List;
...@@ -32,4 +33,10 @@ public interface TContractorInfoService extends SuperService<TContractorInfo> { ...@@ -32,4 +33,10 @@ public interface TContractorInfoService extends SuperService<TContractorInfo> {
boolean deleteEntity(String infoId); boolean deleteEntity(String infoId);
/**
*获取承包商信息下拉选择列表
* @return
*/
List<TContractorInfo> selectAll(TContractorInfoParam param);
} }
...@@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.testor.module.contractor.ledger.dao.TContractorInfoDao; import com.testor.module.contractor.ledger.dao.TContractorInfoDao;
import com.testor.module.contractor.ledger.model.domain.TContractorInfo; import com.testor.module.contractor.ledger.model.domain.TContractorInfo;
import com.testor.module.contractor.ledger.model.dto.TContractorInfoDelParam; import com.testor.module.contractor.ledger.model.dto.TContractorInfoDelParam;
import com.testor.module.contractor.ledger.model.dto.TContractorInfoParam;
import com.testor.module.contractor.ledger.service.TContractorInfoService; import com.testor.module.contractor.ledger.service.TContractorInfoService;
import com.tongtech.tfw.backend.common.biz.constants.BizConstants; import com.tongtech.tfw.backend.common.biz.constants.BizConstants;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.tongtech.tfw.backend.common.models.supers.SuperServiceImpl; import com.tongtech.tfw.backend.common.models.supers.SuperServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
...@@ -41,4 +43,9 @@ public class TContractorInfoServiceImpl extends SuperServiceImpl<TContractorInfo ...@@ -41,4 +43,9 @@ public class TContractorInfoServiceImpl extends SuperServiceImpl<TContractorInfo
data.setStatus(BizConstants.STATUS_DELETE); data.setStatus(BizConstants.STATUS_DELETE);
return this.updateById(data); return this.updateById(data);
} }
@Override
public List<TContractorInfo> selectAll(TContractorInfoParam param) {
return this.baseMapper.selectAll(param);
}
} }
...@@ -199,7 +199,14 @@ public class TContractorPersonServiceImpl extends SuperServiceImpl<TContractorPe ...@@ -199,7 +199,14 @@ public class TContractorPersonServiceImpl extends SuperServiceImpl<TContractorPe
Page<TContractorPerson> resultPage=new Page<>(page,limit); Page<TContractorPerson> resultPage=new Page<>(page,limit);
// TODO 根据需求修改查询条件及查询参数 // TODO 根据需求修改查询条件及查询参数
QueryWrapper<TContractorPerson> queryWrapper=this.createQuery(param); QueryWrapper<TContractorPerson> queryWrapper=this.createQuery(param);
return this.page(resultPage, queryWrapper); Page<TContractorPerson> result = this.page(resultPage, queryWrapper);
for(TContractorPerson tContractorPerson:result.getRecords()){
TContractorInfo contractorInfo = tContractorInfoService.getById(tContractorPerson.getInfoId());
if(null != contractorInfo){
tContractorPerson.setInfoDesignation(contractorInfo.getName());
}
}
return result;
} }
@Override @Override
......
...@@ -84,6 +84,8 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor ...@@ -84,6 +84,8 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor
@Override @Override
public Page<THazardWorkPlanCheck> selectTHazardWorkPlanCheckManageList(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) { public Page<THazardWorkPlanCheck> selectTHazardWorkPlanCheckManageList(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
tHazardWorkPlanCheckParam.setStartTime(montageStartTime(tHazardWorkPlanCheckParam.getStartTime()));
tHazardWorkPlanCheckParam.setEndTime(montageEndTime(tHazardWorkPlanCheckParam.getEndTime()));
IPage<THazardWorkPlanCheck> page = new Page<>(Long.valueOf(tHazardWorkPlanCheckParam.getPage()), Long.valueOf(tHazardWorkPlanCheckParam.getLimit())); IPage<THazardWorkPlanCheck> page = new Page<>(Long.valueOf(tHazardWorkPlanCheckParam.getPage()), Long.valueOf(tHazardWorkPlanCheckParam.getLimit()));
List<String> orgIdList = new ArrayList<>(); List<String> orgIdList = new ArrayList<>();
if(null != tHazardWorkPlanCheckParam.getOrgIdList() && tHazardWorkPlanCheckParam.getOrgIdList().size()>0){ if(null != tHazardWorkPlanCheckParam.getOrgIdList() && tHazardWorkPlanCheckParam.getOrgIdList().size()>0){
...@@ -158,6 +160,9 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor ...@@ -158,6 +160,9 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor
@Override @Override
public List<HazardWorkPlanCheckComplianceStatisticsVO> selectCheckComplianceStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) { public List<HazardWorkPlanCheckComplianceStatisticsVO> selectCheckComplianceStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
tHazardWorkPlanCheckParam.setStartTime(montageStartTime(tHazardWorkPlanCheckParam.getStartTime()));
tHazardWorkPlanCheckParam.setEndTime(montageEndTime(tHazardWorkPlanCheckParam.getEndTime()));
String orgId = tHazardWorkPlanCheckParam.getOrgId(); String orgId = tHazardWorkPlanCheckParam.getOrgId();
if (StringHelper.isEmpty(orgId)) { if (StringHelper.isEmpty(orgId)) {
// 获取登录企业 // 获取登录企业
...@@ -225,11 +230,30 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor ...@@ -225,11 +230,30 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor
@Override @Override
public List<HazardWorkPlanCheckProblemTypeStatisticsVO> selectCheckProblemTypeStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) { public List<HazardWorkPlanCheckProblemTypeStatisticsVO> selectCheckProblemTypeStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
tHazardWorkPlanCheckParam.setStartTime(montageStartTime(tHazardWorkPlanCheckParam.getStartTime()));
tHazardWorkPlanCheckParam.setEndTime(montageEndTime(tHazardWorkPlanCheckParam.getEndTime()));
return this.baseMapper.selectCheckProblemTypeStatistics(tHazardWorkPlanCheckParam); return this.baseMapper.selectCheckProblemTypeStatistics(tHazardWorkPlanCheckParam);
} }
@Override @Override
public List<HazardWorkPlanCheckProblemCountStatisticsVO> selectCheckProblemCountStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) { public List<HazardWorkPlanCheckProblemCountStatisticsVO> selectCheckProblemCountStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
tHazardWorkPlanCheckParam.setStartTime(montageStartTime(tHazardWorkPlanCheckParam.getStartTime()));
tHazardWorkPlanCheckParam.setEndTime(montageEndTime(tHazardWorkPlanCheckParam.getEndTime()));
return this.baseMapper.selectCheckProblemCountStatistics(tHazardWorkPlanCheckParam); return this.baseMapper.selectCheckProblemCountStatistics(tHazardWorkPlanCheckParam);
} }
public String montageStartTime(String startTime){
if(startTime !=null && !"".equals(startTime) ){
startTime = startTime+" 00:00:00";
}
return startTime;
}
public String montageEndTime(String endTime){
if(endTime !=null && !"".equals(endTime) ){
endTime = endTime+" 23:59:59";
}
return endTime;
}
} }
...@@ -19,4 +19,15 @@ ...@@ -19,4 +19,15 @@
<id column="biz_scope" property="bizScope"/> <id column="biz_scope" property="bizScope"/>
<id column="is_blacklist" property="isBlacklist"/> <id column="is_blacklist" property="isBlacklist"/>
</resultMap> </resultMap>
<select id="selectAll" resultMap="BaseResultMap">
SELECT DISTINCT ON (name, credit_code) *
FROM t_contractor_info
WHERE status = '0' and name !=''
<if test="name!='' and name!=null">
name like concat('%', #{name}, '%')
</if>
ORDER BY name, credit_code, id
</select>
</mapper> </mapper>
\ No newline at end of file
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