Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a1a7395e92
|
|
@ -42,7 +42,7 @@ public class BmAgreementInfoController extends BaseController
|
|||
* 查询协议管理列表
|
||||
*/
|
||||
@ApiOperation(value = "查询协议管理列表")
|
||||
@RequiresPermissions("basic:info:list")
|
||||
//@RequiresPermissions("basic:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BmAgreementInfo bmAgreementInfo)
|
||||
{
|
||||
|
|
@ -56,7 +56,7 @@ public class BmAgreementInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "导出协议管理列表")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:export")
|
||||
//@RequiresPermissions("basic:info:export")
|
||||
@SysLog(title = "协议管理", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出协议管理")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BmAgreementInfo bmAgreementInfo)
|
||||
|
|
@ -70,7 +70,7 @@ public class BmAgreementInfoController extends BaseController
|
|||
* 获取协议管理详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取协议管理详细信息")
|
||||
@RequiresPermissions("basic:info:query")
|
||||
//@RequiresPermissions("basic:info:query")
|
||||
@GetMapping(value = "/{agreementId}")
|
||||
public AjaxResult getInfo(@PathVariable("agreementId") Long agreementId)
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@ public class BmAgreementInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "新增协议管理")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:add")
|
||||
//@RequiresPermissions("basic:info:add")
|
||||
@SysLog(title = "协议管理", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增协议管理")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BmAgreementInfo bmAgreementInfo)
|
||||
|
|
@ -99,7 +99,7 @@ public class BmAgreementInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "修改协议管理")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:edit")
|
||||
//@RequiresPermissions("basic:info:edit")
|
||||
@SysLog(title = "协议管理", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改协议管理")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BmAgreementInfo bmAgreementInfo)
|
||||
|
|
@ -112,7 +112,7 @@ public class BmAgreementInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "删除协议管理")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:remove")
|
||||
//@RequiresPermissions("basic:info:remove")
|
||||
@SysLog(title = "协议管理", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除协议管理")
|
||||
@DeleteMapping("/{agreementIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] agreementIds)
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@ public class BmAgreementInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "往来单位id")
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 往来单位
|
||||
*/
|
||||
@Excel(name = "往来单位")
|
||||
@ApiModelProperty(value = "往来单位")
|
||||
private String unitName;
|
||||
|
||||
/** 工程标段ID */
|
||||
@Excel(name = "工程标段ID")
|
||||
@ApiModelProperty(value = "工程标段ID")
|
||||
|
|
|
|||
|
|
@ -138,4 +138,7 @@ public class BmProject extends BaseEntity
|
|||
@ApiModelProperty(value = "所属项目中心")
|
||||
@Size(max=60, message = "所属项目中心长度不能超过60")
|
||||
private String proCenter;
|
||||
|
||||
@ApiModelProperty(value = "往来单位id")
|
||||
private Long unitId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,5 +81,7 @@ public class BmUnit extends BaseEntity
|
|||
@ApiModelProperty(value = "绑定人员名称")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "工程id")
|
||||
private Long projectId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
package com.bonus.material.common.controller;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.common.service.SelectService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
|
|
@ -24,15 +24,15 @@ public class SelectController {
|
|||
private SelectService service;
|
||||
|
||||
@ApiOperation(value = "往来单位下拉选")
|
||||
@PostMapping("getUnitCbx")
|
||||
public AjaxResult getUnitData(@RequestBody SelectDto dto) {
|
||||
return service.getUnitData(dto);
|
||||
@PostMapping("getUnitList")
|
||||
public AjaxResult getUnitList(@RequestBody BmUnit bmUnit) {
|
||||
return service.getUnitList(bmUnit);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "工程下拉选")
|
||||
@PostMapping("getSectionEngineeringCbx")
|
||||
public AjaxResult getProData(@RequestBody SelectDto dto) {
|
||||
return service.getProData(dto);
|
||||
@PostMapping("getProjectList")
|
||||
public AjaxResult getProjectList(@RequestBody BmProject bmProject) {
|
||||
return service.getProjectList(bmProject);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "机具类型下拉选")
|
||||
|
|
@ -41,35 +41,35 @@ public class SelectController {
|
|||
return service.getMaTypeData(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "数据字典下拉选")
|
||||
@PostMapping("getDictByPidCbx")
|
||||
public AjaxResult getDictByPidCbx(@RequestBody SelectDto dto){
|
||||
return service.getDictByPidCbx(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单位树/归属部门/所属上级")
|
||||
@PostMapping("getDeptTree")
|
||||
public AjaxResult getDeptTree(@RequestBody SelectDto dto){
|
||||
return service.getDeptTree(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "岗位下拉选")
|
||||
@PostMapping("getPostCbx")
|
||||
public AjaxResult getPostCbx(@RequestBody SelectDto dto){
|
||||
return service.getPostCbx(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "角色下拉选")
|
||||
@PostMapping("getRoleCbx")
|
||||
public AjaxResult getRoleCbx(@RequestBody SelectDto dto){
|
||||
return service.getRoleCbx(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单位类型下拉选")
|
||||
@PostMapping("getUnitTypeCbx")
|
||||
public AjaxResult getUnitTypeCbx(@RequestBody SelectDto dto){
|
||||
return service.getUnitTypeCbx(dto);
|
||||
}
|
||||
// @ApiOperation(value = "数据字典下拉选")
|
||||
// @PostMapping("getDictByPidCbx")
|
||||
// public AjaxResult getDictByPidCbx(@RequestBody SelectDto dto){
|
||||
// return service.getDictByPidCbx(dto);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "单位树/归属部门/所属上级")
|
||||
// @PostMapping("getDeptTree")
|
||||
// public AjaxResult getDeptTree(@RequestBody SelectDto dto){
|
||||
// return service.getDeptTree(dto);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "岗位下拉选")
|
||||
// @PostMapping("getPostCbx")
|
||||
// public AjaxResult getPostCbx(@RequestBody SelectDto dto){
|
||||
// return service.getPostCbx(dto);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "角色下拉选")
|
||||
// @PostMapping("getRoleCbx")
|
||||
// public AjaxResult getRoleCbx(@RequestBody SelectDto dto){
|
||||
// return service.getRoleCbx(dto);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "单位类型下拉选")
|
||||
// @PostMapping("getUnitTypeCbx")
|
||||
// public AjaxResult getUnitTypeCbx(@RequestBody SelectDto dto){
|
||||
// return service.getUnitTypeCbx(dto);
|
||||
// }
|
||||
|
||||
@ApiOperation(value = "设备类型树")
|
||||
@PostMapping("getDeviceTypeTree")
|
||||
|
|
@ -89,11 +89,11 @@ public class SelectController {
|
|||
return service.getDeviceFactoryCbx(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "工程项目")
|
||||
@PostMapping("getProCbx")
|
||||
public AjaxResult getProCbx(@RequestBody SelectDto dto){
|
||||
return service.getProCbx(dto);
|
||||
}
|
||||
// @ApiOperation(value = "工程项目")
|
||||
// @PostMapping("getProCbx")
|
||||
// public AjaxResult getProCbx(@RequestBody SelectDto dto){
|
||||
// return service.getProCbx(dto);
|
||||
// }
|
||||
|
||||
@ApiOperation(value = "配件所属上级树")
|
||||
@PostMapping("getAccessoryTree")
|
||||
|
|
@ -113,11 +113,11 @@ public class SelectController {
|
|||
return service.getGoodsShelvesCbx(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "用户/维修员/库管员/采购员")
|
||||
@PostMapping("getUserByRoleIdCbx")
|
||||
public AjaxResult getUserByRoleIdCbx(@RequestBody SelectDto dto){
|
||||
return service.getUserByRoleIdCbx(dto);
|
||||
}
|
||||
// @ApiOperation(value = "用户/维修员/库管员/采购员")
|
||||
// @PostMapping("getUserByRoleIdCbx")
|
||||
// public AjaxResult getUserByRoleIdCbx(@RequestBody SelectDto dto){
|
||||
// return service.getUserByRoleIdCbx(dto);
|
||||
// }
|
||||
|
||||
@ApiOperation(value = "往来单位id和标段工程id获取协议信息")
|
||||
@PostMapping("getAgreementInfoById")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.material.common.mapper;
|
||||
|
||||
import com.bonus.common.biz.domain.TreeNode;
|
||||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.common.domain.vo.AgreementVo;
|
||||
import com.bonus.material.common.domain.vo.SelectVo;
|
||||
|
|
@ -15,23 +17,23 @@ import java.util.List;
|
|||
public interface SelectMapper {
|
||||
/**
|
||||
* 往来单位下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @param bmUnit
|
||||
* @return List<BmUnit>
|
||||
* @description 往来单位
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 14:23
|
||||
*/
|
||||
List<SelectVo> getUnitData(SelectDto dto);
|
||||
List<BmUnit> getUnitList(BmUnit bmUnit);
|
||||
|
||||
/**
|
||||
* 工程下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @param bmProject
|
||||
* @return List<BmProject>
|
||||
* @description 工程
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 15:05
|
||||
*/
|
||||
List<SelectVo> getProData(SelectDto dto);
|
||||
List<BmProject> getProjectList(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 机具类型下拉选
|
||||
|
|
@ -43,55 +45,6 @@ public interface SelectMapper {
|
|||
*/
|
||||
List<SelectVo> getMaTypeData(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 数据字典下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description 数据字典下拉选
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 16:23
|
||||
*/
|
||||
List<SelectVo> getDictByPidCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 单位树/归属部门/所属上级
|
||||
* @param dto
|
||||
* @return List<TreeVo>
|
||||
* @description 单位树/归属部门/所属上级
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 17:10
|
||||
*/
|
||||
List<TreeNode> getDeptTree(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 岗位下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description 岗位下拉选
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 17:50
|
||||
*/
|
||||
List<SelectVo> getPostCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 角色下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description 角色下拉选
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 17:56
|
||||
*/
|
||||
List<SelectVo> getRoleCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 单位类型下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description 单位类型下拉选
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 18:01
|
||||
*/
|
||||
List<SelectVo> getUnitTypeCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 设备类型树
|
||||
|
|
@ -123,16 +76,6 @@ public interface SelectMapper {
|
|||
*/
|
||||
List<SelectVo> getDeviceFactoryCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description 工程项目
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 20:01
|
||||
*/
|
||||
List<SelectVo> getProCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 配件所属上级树
|
||||
* @param
|
||||
|
|
@ -153,25 +96,6 @@ public interface SelectMapper {
|
|||
*/
|
||||
List<TreeNode> getGoodsShelvesCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 用户/维修员/库管员/采购员-下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description 用户/维修员/库管员/采购员-下拉选
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 20:54
|
||||
*/
|
||||
List<SelectVo> getUserByRoleIdCbxSelect(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 用户/维修员/库管员/采购员-树
|
||||
* @param dto
|
||||
* @return List<TreeNode>
|
||||
* @description 用户/维修员/库管员/采购员-树
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 21:02
|
||||
*/
|
||||
List<TreeNode> getUserByRoleIdCbxTree(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 往来单位id和标段工程id获取协议信息
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.material.common.service;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
|
||||
/**
|
||||
|
|
@ -11,23 +13,23 @@ public interface SelectService {
|
|||
|
||||
/**
|
||||
* 往来单位
|
||||
* @param dto
|
||||
* @param bmUnit
|
||||
* @return AjaxResult
|
||||
* @description 往来单位
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 14:20
|
||||
*/
|
||||
AjaxResult getUnitData(SelectDto dto);
|
||||
AjaxResult getUnitList(BmUnit bmUnit);
|
||||
|
||||
/**
|
||||
* 工程
|
||||
* @param dto
|
||||
* @param bmProject
|
||||
* @return AjaxResult
|
||||
* @description 工程
|
||||
* @author cwchen
|
||||
* @date 2023/12/20 15:04
|
||||
*/
|
||||
AjaxResult getProData(SelectDto dto);
|
||||
AjaxResult getProjectList(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 机具类型
|
||||
|
|
@ -47,7 +49,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 16:22
|
||||
*/
|
||||
AjaxResult getDictByPidCbx(SelectDto dto);
|
||||
// AjaxResult getDictByPidCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 单位树/归属部门/所属上级
|
||||
|
|
@ -57,7 +59,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 16:36
|
||||
*/
|
||||
AjaxResult getDeptTree(SelectDto dto);
|
||||
// AjaxResult getDeptTree(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 岗位下拉树
|
||||
|
|
@ -67,7 +69,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 17:45
|
||||
*/
|
||||
AjaxResult getPostCbx(SelectDto dto);
|
||||
// AjaxResult getPostCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 角色下拉选
|
||||
|
|
@ -77,7 +79,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 17:56
|
||||
*/
|
||||
AjaxResult getRoleCbx(SelectDto dto);
|
||||
// AjaxResult getRoleCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 单位类型下拉选
|
||||
|
|
@ -87,7 +89,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 18:00
|
||||
*/
|
||||
AjaxResult getUnitTypeCbx(SelectDto dto);
|
||||
// AjaxResult getUnitTypeCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 设备类型树
|
||||
|
|
@ -127,7 +129,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 20:01
|
||||
*/
|
||||
AjaxResult getProCbx(SelectDto dto);
|
||||
// AjaxResult getProCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 配件所属上级树
|
||||
|
|
@ -157,7 +159,7 @@ public interface SelectService {
|
|||
* @author cwchen
|
||||
* @date 2023/12/20 20:48
|
||||
*/
|
||||
AjaxResult getUserByRoleIdCbx(SelectDto dto);
|
||||
// AjaxResult getUserByRoleIdCbx(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 往来单位id和标段工程id获取协议信息
|
||||
|
|
@ -175,4 +177,5 @@ public interface SelectService {
|
|||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult getPartTree(SelectDto dto);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import com.bonus.common.biz.constant.GlobalConstants;
|
|||
import com.bonus.common.biz.domain.TreeBuild;
|
||||
import com.bonus.common.biz.domain.TreeNode;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.common.domain.vo.AgreementVo;
|
||||
import com.bonus.material.common.domain.vo.SelectVo;
|
||||
|
|
@ -29,10 +31,10 @@ public class SelectServiceImpl implements SelectService {
|
|||
private SelectMapper mapper;
|
||||
|
||||
@Override
|
||||
public AjaxResult getUnitData(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
public AjaxResult getUnitList(BmUnit bmUnit) {
|
||||
List<BmUnit> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getUnitData(dto);
|
||||
list = mapper.getUnitList(bmUnit);
|
||||
} catch (Exception e) {
|
||||
log.error("往来单位-查询失败", e);
|
||||
}
|
||||
|
|
@ -40,9 +42,9 @@ public class SelectServiceImpl implements SelectService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getProData(SelectDto dto) {
|
||||
public AjaxResult getProjectList(BmProject bmProject) {
|
||||
try {
|
||||
List<SelectVo> list = mapper.getProData(dto);
|
||||
List<BmProject> list = mapper.getProjectList(bmProject);
|
||||
list.removeIf(item -> item == null);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -62,67 +64,67 @@ public class SelectServiceImpl implements SelectService {
|
|||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getDictByPidCbx(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getDictByPidCbx(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("数据字典-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getDeptTree(SelectDto dto) {
|
||||
List<TreeNode> groupList = new ArrayList<>();
|
||||
List<TreeNode> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getDeptTree(dto);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
// 创建树形结构(数据集合作为参数)
|
||||
TreeBuild treeBuild = new TreeBuild(list);
|
||||
// 原查询结果转换树形结构
|
||||
groupList = treeBuild.buildTree();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("单位树/归属部门/所属上级-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(groupList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getPostCbx(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getPostCbx(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("岗位下拉选-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getRoleCbx(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getRoleCbx(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("角色下拉选-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getUnitTypeCbx(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getUnitTypeCbx(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("单位类型下拉选-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
// @Override
|
||||
// public AjaxResult getDictByPidCbx(SelectDto dto) {
|
||||
// List<SelectVo> list = new ArrayList<>();
|
||||
// try {
|
||||
// list = mapper.getDictByPidCbx(dto);
|
||||
// } catch (Exception e) {
|
||||
// log.error("数据字典-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AjaxResult getDeptTree(SelectDto dto) {
|
||||
// List<TreeNode> groupList = new ArrayList<>();
|
||||
// List<TreeNode> list = new ArrayList<>();
|
||||
// try {
|
||||
// list = mapper.getDeptTree(dto);
|
||||
// if (CollectionUtils.isNotEmpty(list)) {
|
||||
// // 创建树形结构(数据集合作为参数)
|
||||
// TreeBuild treeBuild = new TreeBuild(list);
|
||||
// // 原查询结果转换树形结构
|
||||
// groupList = treeBuild.buildTree();
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("单位树/归属部门/所属上级-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(groupList);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AjaxResult getPostCbx(SelectDto dto) {
|
||||
// List<SelectVo> list = new ArrayList<>();
|
||||
// try {
|
||||
// list = mapper.getPostCbx(dto);
|
||||
// } catch (Exception e) {
|
||||
// log.error("岗位下拉选-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AjaxResult getRoleCbx(SelectDto dto) {
|
||||
// List<SelectVo> list = new ArrayList<>();
|
||||
// try {
|
||||
// list = mapper.getRoleCbx(dto);
|
||||
// } catch (Exception e) {
|
||||
// log.error("角色下拉选-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AjaxResult getUnitTypeCbx(SelectDto dto) {
|
||||
// List<SelectVo> list = new ArrayList<>();
|
||||
// try {
|
||||
// list = mapper.getUnitTypeCbx(dto);
|
||||
// } catch (Exception e) {
|
||||
// log.error("单位类型下拉选-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public AjaxResult getDeviceTypeTree(SelectDto dto) {
|
||||
|
|
@ -164,16 +166,16 @@ public class SelectServiceImpl implements SelectService {
|
|||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getProCbx(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getProCbx(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("工程项目-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
// @Override
|
||||
// public AjaxResult getProCbx(SelectDto dto) {
|
||||
// List<SelectVo> list = new ArrayList<>();
|
||||
// try {
|
||||
// list = mapper.getProCbx(dto);
|
||||
// } catch (Exception e) {
|
||||
// log.error("工程项目-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public AjaxResult getAccessoryTree() {
|
||||
|
|
@ -229,32 +231,32 @@ public class SelectServiceImpl implements SelectService {
|
|||
return AjaxResult.success(groupList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getUserByRoleIdCbx(SelectDto dto) {
|
||||
try {
|
||||
if (Objects.equals(GlobalConstants.STRING_1, dto.getType())) {
|
||||
// 用户/维修员/库管员/采购员-下拉选
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
list = mapper.getUserByRoleIdCbxSelect(dto);
|
||||
return AjaxResult.success(list);
|
||||
} else if (Objects.equals(GlobalConstants.STRING_2, dto.getType())) {
|
||||
List<TreeNode> groupList = new ArrayList<>();
|
||||
List<TreeNode> list = new ArrayList<>();
|
||||
// 用户/维修员/库管员/采购员-树
|
||||
list = mapper.getUserByRoleIdCbxTree(dto);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
// 创建树形结构(数据集合作为参数)
|
||||
TreeBuild treeBuild = new TreeBuild(list);
|
||||
// 原查询结果转换树形结构
|
||||
groupList = treeBuild.buildTree();
|
||||
}
|
||||
return AjaxResult.success(groupList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("用户/维修员/库管员/采购员-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(null);
|
||||
}
|
||||
// @Override
|
||||
// public AjaxResult getUserByRoleIdCbx(SelectDto dto) {
|
||||
// try {
|
||||
// if (Objects.equals(GlobalConstants.STRING_1, dto.getType())) {
|
||||
// // 用户/维修员/库管员/采购员-下拉选
|
||||
// List<SelectVo> list = new ArrayList<>();
|
||||
// list = mapper.getUserByRoleIdCbxSelect(dto);
|
||||
// return AjaxResult.success(list);
|
||||
// } else if (Objects.equals(GlobalConstants.STRING_2, dto.getType())) {
|
||||
// List<TreeNode> groupList = new ArrayList<>();
|
||||
// List<TreeNode> list = new ArrayList<>();
|
||||
// // 用户/维修员/库管员/采购员-树
|
||||
// list = mapper.getUserByRoleIdCbxTree(dto);
|
||||
// if (CollectionUtils.isNotEmpty(list)) {
|
||||
// // 创建树形结构(数据集合作为参数)
|
||||
// TreeBuild treeBuild = new TreeBuild(list);
|
||||
// // 原查询结果转换树形结构
|
||||
// groupList = treeBuild.buildTree();
|
||||
// }
|
||||
// return AjaxResult.success(groupList);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("用户/维修员/库管员/采购员-查询失败", e);
|
||||
// }
|
||||
// return AjaxResult.success(null);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public AjaxResult getAgreementInfoById(SelectDto dto) {
|
||||
|
|
@ -270,5 +272,4 @@ public class SelectServiceImpl implements SelectService {
|
|||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
* 查询领料任务列表
|
||||
*/
|
||||
@ApiOperation(value = "查询领料任务列表")
|
||||
@RequiresPermissions("lease:info:list")
|
||||
//@RequiresPermissions("lease:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LeaseApplyInfo leaseApplyInfo) {
|
||||
startPage();
|
||||
|
|
@ -55,7 +55,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "导出领料任务列表")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:info:export")
|
||||
//@RequiresPermissions("lease:info:export")
|
||||
@SysLog(title = "领料任务", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料任务")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, LeaseApplyInfo leaseApplyInfo) {
|
||||
|
|
@ -68,7 +68,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
* 获取领料任务详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取领料任务详细信息")
|
||||
@RequiresPermissions("lease:info:query")
|
||||
//@RequiresPermissions("lease:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(leaseApplyInfoService.selectLeaseApplyInfoById(id));
|
||||
|
|
@ -79,7 +79,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "新增领料任务")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:info:add")
|
||||
//@RequiresPermissions("lease:info:add")
|
||||
@SysLog(title = "领料任务", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增领料任务")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody LeaseApplyRequestVo leaseApplyRequestVo) {
|
||||
|
|
@ -95,7 +95,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "修改领料任务")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:info:edit")
|
||||
//@RequiresPermissions("lease:info:edit")
|
||||
@SysLog(title = "领料任务", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改领料任务")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody LeaseApplyRequestVo leaseApplyRequestVo) {
|
||||
|
|
@ -111,7 +111,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "删除领料任务")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:info:remove")
|
||||
//@RequiresPermissions("lease:info:remove")
|
||||
@SysLog(title = "领料任务", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除领料任务")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ public class PurchaseCheckDetails extends BaseEntity {
|
|||
@Excel(name = "物资厂家名称")
|
||||
private String supplierName;
|
||||
|
||||
/** 0-未验收,1-已验收,2-待通知,3-验收不通过,4-已入库,5-入库驳回,6-综合服务中心审核通过,7-综合服务中心不通过 */
|
||||
//@Excel(name = "0-未验收,1-已验收,2-待通知,3-验收不通过,4-已入库,5-入库驳回,6-综合服务中心审核通过,7-综合服务中心不通过")
|
||||
@ApiModelProperty(value = "0-未验收,1-已验收,2-待通知,3-验收不通过,4-已入库,5-入库驳回,6-综合服务中心审核通过,7-综合服务中心不通过")
|
||||
/** 状态,参考数据字典purchase_task_status键值 */
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(value = "状态,参考数据字典purchase_task_status键值")
|
||||
private Integer status;
|
||||
|
||||
/** 出厂日期 */
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ public class PurchaseQueryDto {
|
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private Integer taskStatus;
|
||||
// @ApiModelProperty(value = "外层任务状态")
|
||||
// private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ public interface PurchaseCheckDetailsMapper {
|
|||
* @param taskId * @param type 1-验收,2-入库
|
||||
* @return String类型,多个物资类型根据逗号分割
|
||||
*/
|
||||
String selectMaTypeNameByTaskId(@Param("taskId") Long taskId, @Param("status") Integer status);
|
||||
//String selectMaTypeNameByTaskId(@Param("taskId") Long taskId, @Param("status") Integer status);
|
||||
|
||||
String selectMaTypeNameByTaskAndStatusList(@Param("taskId") Long taskId, @Param("statusList") List<Integer> statusList);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -68,15 +68,19 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
@Override
|
||||
public PurchaseCheckDto selectPurchaseCheckInfoById(PurchaseQueryDto purchaseQueryDto) {
|
||||
PurchaseCheckDto purchaseCheckDtoResult = new PurchaseCheckDto();
|
||||
boolean isAllowPartTransfer = bmConfigService.isBmConfigEnabledWithDefaultFalse(BmConfigItems.BOOLEAN_ALLOW_PURCHASE_PART_TRANSFER);
|
||||
List<PurchaseCheckDetails> purchaseCheckDetails;
|
||||
if (isAllowPartTransfer) {
|
||||
purchaseCheckDetails = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListByQueryDto(purchaseQueryDto);
|
||||
} else {
|
||||
purchaseQueryDto.setTaskStatus(null);
|
||||
purchaseCheckDetails = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListByQueryDto(purchaseQueryDto);
|
||||
PurchaseCheckInfo purchaseCheckInfo = purchaseCheckInfoMapper.selectPurchaseCheckInfoById(purchaseQueryDto.getId());
|
||||
if (purchaseCheckInfo != null) {
|
||||
purchaseCheckDtoResult.setPurchaseCheckInfo(purchaseCheckInfo);
|
||||
boolean isAllowPartTransfer = bmConfigService.isBmConfigEnabledWithDefaultFalse(BmConfigItems.BOOLEAN_ALLOW_PURCHASE_PART_TRANSFER);
|
||||
List<PurchaseCheckDetails> purchaseCheckDetails;
|
||||
if (isAllowPartTransfer) {
|
||||
purchaseCheckDetails = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListByQueryDto(purchaseQueryDto);
|
||||
} else {
|
||||
purchaseQueryDto.setStatusList(null);
|
||||
purchaseCheckDetails = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListByQueryDto(purchaseQueryDto);
|
||||
}
|
||||
purchaseCheckDtoResult.setPurchaseCheckDetailsList(purchaseCheckDetails);
|
||||
}
|
||||
purchaseCheckDtoResult.setPurchaseCheckDetailsList(purchaseCheckDetails);
|
||||
return purchaseCheckDtoResult;
|
||||
}
|
||||
|
||||
|
|
@ -94,17 +98,15 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
return purchaseCheckInfoResult;
|
||||
}
|
||||
boolean isAllowPartTransfer = bmConfigService.isBmConfigEnabledWithDefaultFalse(BmConfigItems.BOOLEAN_ALLOW_PURCHASE_PART_TRANSFER);
|
||||
// TODO 下一行需要前端传1后删除
|
||||
purchaseQueryDto.setTaskStatus(Objects.isNull(purchaseQueryDto.getTaskStatus()) ? PurchaseTaskStatusEnum.TO_NOTICE.getStatus() : purchaseQueryDto.getTaskStatus());
|
||||
for (PurchaseCheckInfo purchaseInfo : purchaseCheckInfos) {
|
||||
List<PurchaseCheckDetails> purchaseCheckDetails = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListByTaskId(purchaseInfo.getTaskId(), null);
|
||||
OptionalInt minStatus = purchaseCheckDetails.stream().mapToInt(PurchaseCheckDetails::getStatus).min();
|
||||
OptionalInt maxStatus = purchaseCheckDetails.stream().mapToInt(PurchaseCheckDetails::getStatus).max();
|
||||
if (isAllowPartTransfer) {
|
||||
purchaseCheckDetails = purchaseCheckDetails.stream().filter(o -> purchaseQueryDto.getTaskStatus().equals(o.getStatus())).collect(Collectors.toList());
|
||||
purchaseInfo.setPurchaseMaTypeName(purchaseCheckDetailsMapper.selectMaTypeNameByTaskId(purchaseInfo.getTaskId(), purchaseQueryDto.getTaskStatus()));
|
||||
purchaseCheckDetails = purchaseCheckDetails.stream().filter(o -> purchaseQueryDto.getStatusList().contains(o.getStatus())).collect(Collectors.toList());
|
||||
purchaseInfo.setPurchaseMaTypeName(purchaseCheckDetailsMapper.selectMaTypeNameByTaskAndStatusList(purchaseInfo.getTaskId(), purchaseQueryDto.getStatusList()));
|
||||
} else {
|
||||
purchaseInfo.setPurchaseMaTypeName(purchaseCheckDetailsMapper.selectMaTypeNameByTaskId(purchaseInfo.getTaskId(), null));
|
||||
purchaseInfo.setPurchaseMaTypeName(purchaseCheckDetailsMapper.selectMaTypeNameByTaskAndStatusList(purchaseInfo.getTaskId(), new ArrayList<>()));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(purchaseCheckDetails)) {
|
||||
AtomicLong purchaseMaTotalNumber = new AtomicLong(0L);
|
||||
|
|
@ -132,10 +134,11 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
} else {
|
||||
purchaseInfo.setTaskStatus(PurchaseTaskStatusEnum.TASK_IN_PROGRESS.getStatus()); //外层任务进行中
|
||||
}
|
||||
// 设置外层任务列表
|
||||
if (isAllowPartTransfer) {
|
||||
purchaseCheckInfoResult.add(purchaseInfo);
|
||||
} else if (minStatus.isPresent() && Integer.valueOf(minStatus.getAsInt()).equals(purchaseQueryDto.getTaskStatus())) {
|
||||
// 当不允许部分物资状态流转时,例如内部状态含(2,3),其中最小的状态值(2),当等于传入的状态值(2)时,才显示外面的列表
|
||||
} else if (minStatus.isPresent() && purchaseQueryDto.getStatusList().contains(Integer.valueOf(minStatus.getAsInt()))) {
|
||||
// 当不允许部分物资状态流转时,例如内部状态含(2,12,3,13),其中最小的状态值(2),当等于传入的状态值(2,12)时,才显示外面的列表
|
||||
purchaseCheckInfoResult.add(purchaseInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,40 +3,39 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.common.mapper.SelectMapper">
|
||||
|
||||
<!--往来单位-->
|
||||
<select id="getUnitData" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
<select id="getUnitList" resultType="com.bonus.material.basic.domain.BmUnit">
|
||||
/*根据标段工程id关联协议查询往来单位*/
|
||||
<if test="id != null and id != ''">
|
||||
SELECT DISTINCT bu.unit_id AS id,
|
||||
bu.unit_name AS `name`
|
||||
<if test="projectId != null">
|
||||
SELECT DISTINCT bu.unit_id AS unitId,
|
||||
bu.unit_name AS unitName
|
||||
FROM bm_project bpl
|
||||
LEFT JOIN bm_agreement_info bai ON bpl.pro_id = bai.project_id AND bai.`status` = '1'
|
||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id AND bu.del_flag = '0'
|
||||
WHERE bpl.lot_id = #{id} AND bpl.del_flag = '0'
|
||||
WHERE bpl.pro_id = #{projectId} AND bpl.del_flag = '0'
|
||||
</if>
|
||||
<if test="id == null or id == ''">
|
||||
SELECT unit_id AS id,
|
||||
unit_name AS `name`
|
||||
<if test="projectId == null">
|
||||
SELECT unit_id AS unitId,
|
||||
unit_name AS unitName
|
||||
FROM bm_unit
|
||||
WHERE del_flag = '0'
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--标段工程-->
|
||||
<select id="getProData" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
<select id="getProjectList" resultType="com.bonus.material.basic.domain.BmProject">
|
||||
/*根据往来单位id关联协议查询工程*/
|
||||
<if test="id != null and id != ''">
|
||||
SELECT DISTINCT bpl.lot_id AS id,
|
||||
bpl.lot_name AS `name`
|
||||
<if test="unitId != null">
|
||||
SELECT DISTINCT bp.pro_id AS proId,
|
||||
bp.pro_name AS proName
|
||||
FROM bm_unit bu
|
||||
LEFT JOIN bm_agreement_info bai ON bui.unit_id = bai.unit_id AND bai.`status` = '1'
|
||||
LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id AND bpl.del_flag = '0'
|
||||
WHERE bu.unit_id = #{id} AND bu.del_flag = '0'
|
||||
LEFT JOIN bm_agreement_info bai ON bu.unit_id = bai.unit_id AND bai.`status` = '1'
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id AND bp.del_flag = '0'
|
||||
WHERE bu.unit_id = #{unitId} AND bu.del_flag = '0'
|
||||
</if>
|
||||
<if test="id == null or id == ''">
|
||||
SELECT lot_id AS id,
|
||||
lot_name AS `name`
|
||||
<if test="unitId == null">
|
||||
SELECT pro_id AS proId,
|
||||
pro_name AS proName
|
||||
FROM bm_project
|
||||
WHERE del_flag = '0'
|
||||
</if>
|
||||
|
|
@ -49,45 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM ma_type
|
||||
WHERE `level` = #{type} AND del_flag = '0'
|
||||
</select>
|
||||
<!--数据字典下拉选-->
|
||||
<select id="getDictByPidCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT sd2.id,sd2.`name`
|
||||
FROM sys_dic sd
|
||||
LEFT JOIN sys_dic sd2 ON sd.id = sd2.p_id
|
||||
WHERE sd.`value` = #{parentValue} AND sd.p_id = 0
|
||||
</select>
|
||||
<!--单位树/归属部门/所属上级-->
|
||||
<select id="getDeptTree" resultType="com.bonus.common.biz.domain.TreeNode">
|
||||
SELECT dept_id AS id,
|
||||
parent_id AS parentId,
|
||||
dept_name AS label
|
||||
FROM sys_dept
|
||||
WHERE del_flag = '0'
|
||||
ORDER BY order_num
|
||||
</select>
|
||||
<!--岗位下拉选-->
|
||||
<select id="getPostCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT post_id AS id,
|
||||
post_name AS `name`
|
||||
FROM sys_post
|
||||
WHERE status = '0'
|
||||
ORDER BY post_sort
|
||||
</select>
|
||||
<!--角色下拉选-->
|
||||
<select id="getRoleCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT role_id AS id,
|
||||
role_name AS `name`
|
||||
FROM sys_role
|
||||
WHERE status = '0'
|
||||
ORDER BY role_sort
|
||||
</select>
|
||||
<!--单位类型下拉选-->
|
||||
<select id="getUnitTypeCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT sd2.id,sd2.`name`
|
||||
FROM sys_dic sd
|
||||
LEFT JOIN sys_dic sd2 ON sd.id = sd2.p_id
|
||||
WHERE sd.`value` = #{parentValue} AND sd.p_id = 0
|
||||
</select>
|
||||
|
||||
<!--设备类型树-->
|
||||
<select id="getDeviceTypeTree" resultType="com.bonus.common.biz.domain.TreeNode">
|
||||
SELECT mt.type_id AS id,
|
||||
|
|
@ -125,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--资产属性-->
|
||||
<select id="getAssetAttributesCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT prop_id AS id,
|
||||
|
|
@ -133,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE del_flag = '0'
|
||||
ORDER BY create_time
|
||||
</select>
|
||||
|
||||
<!--机具厂家-->
|
||||
<select id="getDeviceFactoryCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT supplier_id AS id,
|
||||
|
|
@ -141,14 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE del_flag = '0'
|
||||
ORDER BY create_time
|
||||
</select>
|
||||
<!--工程项目-->
|
||||
<select id="getProCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT pro_id AS id,
|
||||
pro_name AS `name`
|
||||
FROM bm_project
|
||||
WHERE del_flag = '0' AND status = '0'
|
||||
ORDER BY create_time
|
||||
</select>
|
||||
|
||||
<!--配件所属上级树-->
|
||||
<select id="getAccessoryTree" resultType="com.bonus.common.biz.domain.TreeNode">
|
||||
SELECT pa_id AS id,
|
||||
|
|
@ -170,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE del_flag = '0' and level != '3'
|
||||
ORDER BY create_time
|
||||
</select>
|
||||
|
||||
<!--货架-->
|
||||
<select id="getGoodsShelvesCbx" resultType="com.bonus.common.biz.domain.TreeNode">
|
||||
SELECT house_id AS id,
|
||||
|
|
@ -178,31 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM ma_house_info
|
||||
WHERE del_flag = '0' AND status = '0'
|
||||
</select>
|
||||
<!--用户/维修员/库管员/采购员-下拉选-->
|
||||
<select id="getUserByRoleIdCbxSelect" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT su.user_id AS id,
|
||||
su.nick_name AS `name`
|
||||
FROM sys_role sr
|
||||
LEFT JOIN sys_user_role sur ON sr.role_id = sur.role_id
|
||||
LEFT JOIN sys_user su ON sur.user_id = su.user_id AND su.del_flag = '0'
|
||||
WHERE sr.role_key = #{roleKey} AND sr.del_flag = '0'
|
||||
</select>
|
||||
<!--用户/维修员/库管员/采购员-树-->
|
||||
<select id="getUserByRoleIdCbxTree" resultType="com.bonus.common.biz.domain.TreeNode">
|
||||
SELECT dept_id AS id,
|
||||
parent_id AS parentId,
|
||||
dept_name AS label
|
||||
FROM sys_dept
|
||||
WHERE del_flag = '0'
|
||||
UNION ALL
|
||||
SELECT su.user_id AS id,
|
||||
su.dept_id AS parentId,
|
||||
su.nick_name AS label
|
||||
FROM sys_role sr
|
||||
LEFT JOIN sys_user_role sur ON sr.role_id = sur.role_id
|
||||
LEFT JOIN sys_user su ON sur.user_id = su.user_id AND su.del_flag = '0'
|
||||
WHERE sr.role_key = #{roleKey} AND sr.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<!--往来单位id和标段工程id获取协议信息-->
|
||||
<select id="getAgreementInfoById" resultType="com.bonus.material.common.domain.vo.AgreementVo">
|
||||
SELECT agreement_id AS agreementId,
|
||||
|
|
@ -211,5 +144,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM bm_agreement_info
|
||||
WHERE unit_id = #{unitId} AND project_id = #{projectId} AND status = '1'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -108,8 +108,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="productionTime != null">
|
||||
and pcd.production_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and pcd.status = #{taskStatus}
|
||||
<!-- <if test="taskStatus != null and taskStatus != ''">-->
|
||||
<!-- and pcd.status = #{taskStatus}-->
|
||||
<!-- </if>-->
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
and pcd.status in
|
||||
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (mt.type_name like concat('%', #{keyWord}, '%')
|
||||
|
|
@ -231,28 +237,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectMaTypeNameByTaskId" resultType="java.lang.String">
|
||||
<!-- <select id="selectMaTypeNameByTaskId" resultType="java.lang.String">-->
|
||||
<!-- select-->
|
||||
<!-- GROUP_CONCAT(type_name) typeName-->
|
||||
<!-- from-->
|
||||
<!-- (-->
|
||||
<!-- select-->
|
||||
<!-- distinct pcd.task_id, mt1.type_name-->
|
||||
<!-- from-->
|
||||
<!-- purchase_check_details pcd-->
|
||||
<!-- left join-->
|
||||
<!-- ma_type mt on pcd.type_id = mt.type_id-->
|
||||
<!-- left join-->
|
||||
<!-- ma_type mt1 on mt.parent_id = mt1.type_id-->
|
||||
<!-- where-->
|
||||
<!-- 1=1-->
|
||||
<!-- <if test="status != null">-->
|
||||
<!-- and pcd.status = #{status}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="taskId != null">-->
|
||||
<!-- and pcd.task_id = #{taskId}-->
|
||||
<!-- </if>-->
|
||||
<!-- ) t-->
|
||||
<!-- GROUP BY task_id-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectMaTypeNameByTaskAndStatusList" resultType="java.lang.String">
|
||||
select
|
||||
GROUP_CONCAT(type_name) typeName
|
||||
GROUP_CONCAT(type_name) typeName
|
||||
from
|
||||
(
|
||||
select
|
||||
distinct pcd.task_id, mt1.type_name
|
||||
from
|
||||
purchase_check_details pcd
|
||||
left join
|
||||
ma_type mt on pcd.type_id = mt.type_id
|
||||
left join
|
||||
ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where
|
||||
1=1
|
||||
<if test="status != null">
|
||||
and pcd.status = #{status}
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
and pcd.task_id = #{taskId}
|
||||
</if>
|
||||
) t
|
||||
(
|
||||
select
|
||||
distinct pcd.task_id, mt1.type_name
|
||||
from
|
||||
purchase_check_details pcd
|
||||
left join
|
||||
ma_type mt on pcd.type_id = mt.type_id
|
||||
left join
|
||||
ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where
|
||||
1=1
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
and pcd.status in
|
||||
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
and pcd.task_id = #{taskId}
|
||||
</if>
|
||||
) t
|
||||
GROUP BY task_id
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue