Commit f039d392 authored by 竹天卫's avatar 竹天卫

bug修改

parent 6c727004
......@@ -46,6 +46,7 @@ public class EntrustController {
@ApiOperation(value = "委托分页列表")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "entrustCode", value = "委托单号", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startDate", value = "开始日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "status",
......@@ -59,10 +60,10 @@ public class EntrustController {
@ApiImplicitParam(name = "isUrgent", value = "(1加急,0不加急)", paramType = "query", dataType = "Integer")
})
@GetMapping("/getPage")
public BaseResponse getPage(PageQuery pageQuery, String startDate, String endDate, Integer status,
public BaseResponse getPage(PageQuery pageQuery, String entrustCode, String startDate, String endDate, Integer status,
String clientName, String projectName, String projectCode, Integer isUrgent) {
try {
return entrustService.getPage(pageQuery, startDate, endDate, status, clientName, projectName, projectCode, isUrgent);
return entrustService.getPage(pageQuery, entrustCode, startDate, endDate, status, clientName, projectName, projectCode, isUrgent);
} catch (Exception e) {
log.debug("委托分页列表{}", e);
}
......
......@@ -5,6 +5,9 @@
<sql id="where">
<where>
and e.is_delete = 1
<if test="params.entrustCode != null and params.entrustCode != ''">
and e.entrust_code like concat('%', #{params.entrustCode}, '%')
</if>
<if test="params.startDate != null and params.startDate != ''">
and DATE(e.entrust_date) &gt;= #{params.startDate}
</if>
......@@ -149,12 +152,13 @@
END
) as statusValue,
p.id as projectId, p.name as projectName, p.code as projectCode,
su.name as userName, e.is_urgent as isUrgent
su.name as userName, e.is_urgent as isUrgent,c.name as clientName
from sample_handle t
left join sys_user su on su.id = t.user_id
left join sample s on s.id = t.sample_id
left join entrust e on e.id = s.entrust_id
left join project p on p.id = e.project_id
left join client c on c.id = e.client_id
where 1=1
<if test="params.userId != null">
and t.user_id = #{params.userId}
......@@ -185,12 +189,13 @@
END
) as statusValue,
p.id as projectId, p.name as projectName, p.code as projectCode,
su.name as userName, e.is_urgent as isUrgent
su.name as userName, e.is_urgent as isUrgent, c.name as clientName
from sample_distribution t
left join sys_user su on su.id = t.user_id
left join sample s on s.id = t.sample_id
left join entrust e on e.id = s.entrust_id
left join project p on p.id = e.project_id
left join client c on c.id = e.client_id
where 1=1
<if test="params.userId != null">
and t.user_id = #{params.userId}
......
......@@ -28,7 +28,7 @@ import java.util.Map;
*/
public interface IEntrustService extends IService<Entrust> {
BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String startDate, String endDate, Integer status,
BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String entrustCode, String startDate, String endDate, Integer status,
String clientName, String projectName, String projectCode, Integer isUrgent);
BaseResponse<String> setTopping(Integer id);
......
......@@ -140,13 +140,14 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
* @return
*/
@Override
public BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String startDate, String endDate, Integer status,
public BaseResponse<IPage<EntrustVo>> getPage(PageQuery pageQuery, String entrustCode, String startDate, String endDate, Integer status,
String clientName, String projectName, String projectCode, Integer isUrgent) {
LoginUser loginUser = userService.getLoginUser();
if (loginUser == null) {
return BaseResponse.errorMsg("请登录账号");
}
Map<String, Object> params = new HashMap<>();
params.put("entrustCode", entrustCode);
params.put("startDate", startDate);
params.put("endDate", endDate);
params.put("status", status);
......
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