Commit 4dc735bd authored by 竹天卫's avatar 竹天卫

委托列表 增加样品名称 和本所编号 筛选

parent 7ea6110a
......@@ -65,13 +65,17 @@ public class EntrustController {
@ApiImplicitParam(name = "clientName", value = "委托单位id", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "projectCode", value = "项目编号", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "isUrgent", value = "(1加急,0不加急)", paramType = "query", dataType = "Integer")
@ApiImplicitParam(name = "isUrgent", value = "(1加急,0不加急)", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "sampleName", value = "项目名称", paramType = "query", dataType = "sampleName"),
@ApiImplicitParam(name = "cementCode", value = "本所编号", paramType = "query", dataType = "cementCode")
})
@GetMapping("/getPage")
public BaseResponse getPage(PageQuery pageQuery, String entrustCode, String startDate, String endDate, Integer status,
String clientName, String projectName, String projectCode, Integer isUrgent) {
String clientName, String projectName, String projectCode, Integer isUrgent,
String sampleName, String cementCode) {
try {
return entrustService.getPage(pageQuery, entrustCode, startDate, endDate, status, clientName, projectName, projectCode, isUrgent);
return entrustService.getPage(pageQuery, entrustCode, startDate, endDate, status, clientName,
projectName, projectCode, isUrgent,sampleName, cementCode);
} catch (Exception e) {
log.debug("委托分页列表{}", e);
}
......
......@@ -5,6 +5,12 @@
<sql id="where">
<where>
and e.is_delete = 1
<if test="params.sampleName != null and params.sampleName != ''">
and s.name like concat('%', #{params.sampleName}, '%')
</if>
<if test="params.cementCode != null and params.cementCode != ''">
and s.cement_code like concat('%', #{params.cementCode}, '%')
</if>
<if test="params.entrustCode != null and params.entrustCode != ''">
and e.entrust_code like concat('%', #{params.entrustCode}, '%')
</if>
......@@ -45,7 +51,7 @@
</sql>
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.EntrustVo">
select e.*, p.name as projectName,p.code as projectCode,
select DISTINCT e.*, p.name as projectName,p.code as projectCode,
c.name as clientName, su.name as userName,
(
CASE e.status
......@@ -67,6 +73,7 @@
left join project p on p.id = e.project_id
left join client c on c.id = e.client_id
left join sys_user su on su.id = e.user_id
left join sample s on s.entrust_id = e.id
<include refid="where"/>
order by e.is_urgent desc, e.is_top desc, e.update_time desc
</select>
......
......@@ -24,7 +24,8 @@ public interface IEntrustService extends IService<Entrust> {
//委托新增 修改 评审
BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String entrustCode, String startDate, String endDate, Integer status,
String clientName, String projectName, String projectCode, Integer isUrgent);
String clientName, String projectName, String projectCode, Integer isUrgent,
String sampleName, String cementCode);
BaseResponse<String> setTopping(Integer id);
......
......@@ -162,7 +162,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
*/
@Override
public BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String entrustCode, String startDate, String endDate, Integer status,
String clientName, String projectName, String projectCode, Integer isUrgent) {
String clientName, String projectName, String projectCode, Integer isUrgent,
String sampleName, String cementCode) {
LoginUser loginUser = userService.getLoginUser();
if (loginUser == null) {
return BaseResponse.noLogin("请登录账号");
......@@ -176,6 +177,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
params.put("projectName", projectName);
params.put("projectCode", projectCode);
params.put("isUrgent", isUrgent);
params.put("sampleName", sampleName);
params.put("cementCode", cementCode);
List<Integer> approvalIdList = sysApprovalMapper.getApprovalId("委托评审");
if (approvalIdList == null) {
return BaseResponse.errorMsg("委托评审信息错误");
......
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