Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b1aa7bef5d
|
|
@ -89,7 +89,7 @@ public class BackApplyController extends BaseController {
|
||||||
* @return AjaxResult对象
|
* @return AjaxResult对象
|
||||||
*/
|
*/
|
||||||
@Log(title = "退料详情查看", businessType = BusinessType.QUERY)
|
@Log(title = "退料详情查看", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("view")
|
@PostMapping("view")
|
||||||
public AjaxResult view(@RequestBody BackApplyInfo record) {
|
public AjaxResult view(@RequestBody BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backApplyService.view(record);
|
List<BackApplyInfo> list =backApplyService.view(record);
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
package com.bonus.sgzb.base.service.impl;
|
package com.bonus.sgzb.base.service.impl;
|
||||||
|
|
||||||
import cn.hutool.http.server.HttpServerRequest;
|
|
||||||
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
|
||||||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
import com.bonus.sgzb.base.domain.vo.dictVo;
|
||||||
import com.bonus.sgzb.base.mapper.RepairMapper;
|
import com.bonus.sgzb.base.mapper.RepairMapper;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
import com.bonus.sgzb.common.core.constant.TokenConstants;
|
|
||||||
import com.bonus.sgzb.common.core.utils.SpringUtils;
|
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.security.service.TokenService;
|
import com.bonus.sgzb.common.security.service.TokenService;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
LEFT JOIN tm_task_agreement tta ON bai.task_id = tta.task_id
|
LEFT JOIN tm_task_agreement tta ON bai.task_id = tta.task_id
|
||||||
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||||
LEFT JOIN bm_unit_info bui ON bai2.unit_id = bui.unit_id
|
LEFT JOIN bm_unit_info bui ON bai2.unit_id = bui.unit_id
|
||||||
LEFT JOIN bm_project_info bpi ON bai2.project_id = bpi.pro_id
|
LEFT JOIN bm_project_info bpi ON bai2.project_id = bpi.pro_id and bpi.status = '0' and bpi.del_flag = '0'
|
||||||
left join sys_user su on rd.create_by = su.user_id
|
left join sys_user su on rd.create_by = su.user_id
|
||||||
left join sys_dic sd on sd.id = tt.task_status
|
left join sys_dic sd on sd.id = tt.task_status
|
||||||
where 1=1
|
where 1=1
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.bonus.sgzb.system.controller;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.sgzb.system.domain.SelectDto;
|
||||||
|
import com.bonus.sgzb.system.service.SelectService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
* 统一下拉选
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/select/")
|
||||||
|
public class SelectController {
|
||||||
|
|
||||||
|
@Resource(name = "SelectService")
|
||||||
|
private SelectService service;
|
||||||
|
|
||||||
|
@ApiOperation(value = "往来单位下拉选")
|
||||||
|
@PostMapping("getUnitData")
|
||||||
|
public AjaxResult getUnitData(SelectDto dto) {
|
||||||
|
return service.getUnitData(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "工程下拉选")
|
||||||
|
@PostMapping("getProData")
|
||||||
|
public AjaxResult getProData(SelectDto dto) {
|
||||||
|
return service.getProData(dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.bonus.sgzb.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SelectDto {
|
||||||
|
|
||||||
|
/** 参数id*/
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.bonus.sgzb.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SelectVo {
|
||||||
|
|
||||||
|
/** id*/
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
/** 名称*/
|
||||||
|
private String titleName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.bonus.sgzb.system.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.system.domain.SelectDto;
|
||||||
|
import com.bonus.sgzb.system.domain.SelectVo;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
* 统一下拉选
|
||||||
|
*/
|
||||||
|
@Repository("SelectMapper")
|
||||||
|
public interface SelectMapper {
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return List<SelectVo>
|
||||||
|
* @description 往来单位
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/20 14:23
|
||||||
|
*/
|
||||||
|
List<SelectVo> getUnitData(SelectDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return List<SelectVo>
|
||||||
|
* @description 工程
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/20 15:05
|
||||||
|
*/
|
||||||
|
List<SelectVo> getProData(SelectDto dto);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.bonus.sgzb.system.service;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.sgzb.system.domain.SelectDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
* 统一下拉选
|
||||||
|
*/
|
||||||
|
public interface SelectService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return AjaxResult
|
||||||
|
* @description 往来单位
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/20 14:20
|
||||||
|
*/
|
||||||
|
AjaxResult getUnitData(SelectDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return AjaxResult
|
||||||
|
* @description 工程
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/20 15:04
|
||||||
|
*/
|
||||||
|
AjaxResult getProData(SelectDto dto);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.bonus.sgzb.system.service.impl;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.sgzb.system.domain.SelectDto;
|
||||||
|
import com.bonus.sgzb.system.domain.SelectVo;
|
||||||
|
import com.bonus.sgzb.system.mapper.SelectMapper;
|
||||||
|
import com.bonus.sgzb.system.service.SelectService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
* 统一下拉选
|
||||||
|
*/
|
||||||
|
@Service("SelectService")
|
||||||
|
@Slf4j
|
||||||
|
public class SelectServiceImpl implements SelectService {
|
||||||
|
|
||||||
|
@Resource(name = "SelectMapper")
|
||||||
|
private SelectMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getUnitData(SelectDto dto) {
|
||||||
|
List<SelectVo> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
list = mapper.getUnitData(dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("往来单位-查询失败",e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getProData(SelectDto dto) {
|
||||||
|
List<SelectVo> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
list = mapper.getProData(dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("工程-查询失败",e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.bonus.sgzb.system.mapper.SelectMapper">
|
||||||
|
|
||||||
|
<!--往来单位-->
|
||||||
|
<select id="getUnitData" resultType="com.bonus.sgzb.system.domain.SelectVo">
|
||||||
|
/*根据标段工程id关联协议查询往来单位*/
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
SELECT DISTINCT bui.unit_id AS id,
|
||||||
|
bui.unit_name AS titleName
|
||||||
|
FROM bm_project_lot bpl
|
||||||
|
LEFT JOIN bm_agreement_info bai ON bpl.lot_id = bai.project_id AND bai.`status` = '1'
|
||||||
|
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id AND bui.del_flag = '0'
|
||||||
|
WHERE bpl.lot_id = #{id} AND bpl.del_flag = '0'
|
||||||
|
</if>
|
||||||
|
<if test="id == null or id == ''">
|
||||||
|
SELECT unit_id AS id,
|
||||||
|
unit_name AS titleName
|
||||||
|
FROM bm_unit_info
|
||||||
|
WHERE del_flag = '0'
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--工程-->
|
||||||
|
<select id="getProData" resultType="com.bonus.sgzb.system.domain.SelectVo">
|
||||||
|
/*根据往来单位id关联协议查询工程*/
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
SELECT DISTINCT bpl.lot_id AS id,
|
||||||
|
bpl.lot_name AS titleName
|
||||||
|
FROM bm_unit_info bui
|
||||||
|
LEFT JOIN bm_agreement_info bai ON bui.unit_id = bai.unit_id AND bai.`status` = '1'
|
||||||
|
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id AND bpl.del_flag = '0'
|
||||||
|
WHERE bui.unit_id = #{id} AND bui.del_flag = '0'
|
||||||
|
</if>
|
||||||
|
<if test="id == null or id == ''">
|
||||||
|
SELECT lot_id AS id,
|
||||||
|
lot_name AS titleName
|
||||||
|
FROM bm_project_lot
|
||||||
|
WHERE del_flag = '0'
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue