Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
d5ebe3420b
|
|
@ -70,24 +70,47 @@ public class TmTaskController extends BaseController {
|
|||
* @param task 审核信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Log(title = "领料审核通过", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "宁夏领料审核通过", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("auditLeaseByCompany")
|
||||
public AjaxResult auditLeaseByCompany(@RequestBody TmTask task) {
|
||||
return toAjax(tmTaskService.updateLeaseTaskAuditInfo(task));
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料审核通过,分公司,分管,机具分公司统一接口
|
||||
*
|
||||
* @param task 审核信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Log(title = "重庆领料审核通过", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("auditLeaseByCompanyCq")
|
||||
public AjaxResult auditLeaseByCompanyCq(@RequestBody TmTask task) {
|
||||
return toAjax(tmTaskService.updateLeaseTaskAuditInfoCq(task));
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料审核驳回,分公司,分管,机具分公司统一接口
|
||||
*
|
||||
* @param task
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "领料审核驳回", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "宁夏领料审核驳回", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("rejectLeaseByCompany")
|
||||
public AjaxResult rejectLeaseByCompany(@RequestBody TmTask task) {
|
||||
return toAjax(tmTaskService.updateLeaseTaskRejectInfo(task));
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料审核驳回,分公司,分管,机具分公司统一接口
|
||||
*
|
||||
* @param task
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "重庆领料审核驳回", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("rejectLeaseByCompanyCq")
|
||||
public AjaxResult rejectLeaseByCompanyCq(@RequestBody TmTask task) {
|
||||
return toAjax(tmTaskService.updateLeaseTaskRejectInfoCq(task));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务id删除任务表及任务信息
|
||||
|
|
@ -162,6 +185,7 @@ public class TmTaskController extends BaseController {
|
|||
leaseApplyInfo.setTaskId(Integer.valueOf(taskId)); // 设置任务ID
|
||||
leaseApplyInfo.setCompanyId(leaseApplyDetailsList.get(0).getCompanyId()); // 设置设备所属分公司,用于交给哪家审核
|
||||
leaseApplyInfo.setType("2"); // 设置审批层级,先固定2层,后期根据接口传入Type区分来源设定
|
||||
leaseApplyInfo.setLeaseType(task.getLeaseType());
|
||||
|
||||
// 创建领料任务,返回领料任务编号
|
||||
boolean addLeaseTaskResult = leaseApplyInfoService.genderLeaseCode(leaseApplyInfo) > 0;
|
||||
|
|
@ -319,7 +343,7 @@ public class TmTaskController extends BaseController {
|
|||
* @param souceBy app为1 web为0
|
||||
* @return 列表
|
||||
*/
|
||||
@Log(title = "查询机具领料管理列表", businessType = BusinessType.QUERY)
|
||||
@Log(title = "宁夏查询机具领料管理列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping(value = "getLeaseManageListAll")
|
||||
public AjaxResult getLeaseManageListAll(TmTask task, Integer souceBy) {
|
||||
if (StringUtils.isNull(task)) {
|
||||
|
|
@ -337,6 +361,32 @@ public class TmTaskController extends BaseController {
|
|||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, leaseAuditList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询机具领料管理列表
|
||||
*
|
||||
* @param task 筛选条件
|
||||
* @param souceBy app为1 web为0
|
||||
* @return 列表
|
||||
*/
|
||||
@Log(title = "重庆查询机具领料管理列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping(value = "getLeaseManageListAllCq")
|
||||
public AjaxResult getLeaseManageListAllCq(TmTask task, Integer souceBy) {
|
||||
if (StringUtils.isNull(task)) {
|
||||
return AjaxResult.error("参数错误");
|
||||
}
|
||||
List<TmTask> leaseAuditList;
|
||||
if (souceBy != null && souceBy == 1) {
|
||||
leaseAuditList = tmTaskService.getLeaseAuditManageListCq(task);
|
||||
return AjaxResult.success(leaseAuditList);
|
||||
}
|
||||
// startPage();
|
||||
leaseAuditList = tmTaskService.getLeaseAuditManageListCq(task);
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, leaseAuditList));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 领料申请导出
|
||||
* 注意:备注字段到时要换
|
||||
|
|
@ -378,53 +428,13 @@ public class TmTaskController extends BaseController {
|
|||
if (StringUtils.isNull(task)) {
|
||||
return AjaxResult.error("参数错误");
|
||||
}
|
||||
if (StringUtils.isNotBlank(role)) {
|
||||
if (role.contains(STRING_ADMIN)) {
|
||||
//如果是管理员可以看到所有的审核列表
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByAdmin(task);
|
||||
return AjaxResult.success(getDataTable(leaseAuditList));
|
||||
}
|
||||
String[] split = role.split(",");
|
||||
for (String s : split) {
|
||||
if ("kg".equals(s)) {
|
||||
//如果是库管员只能看到自己的审核列表
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListForApp(task);
|
||||
List<TmTask> list = new ArrayList<>();
|
||||
for (int i = 0; i < leaseAuditList.size(); i++) {
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = leaseAuditList.get(i).getLeaseApplyInfoList();
|
||||
if (leaseApplyInfoList != null) {
|
||||
for (int j = 0; j < leaseApplyInfoList.size(); j++) {
|
||||
List<LeaseApplyDetails> leaseApplyDetails = leaseApplyInfoList.get(j).getLeaseApplyDetails();
|
||||
if (leaseApplyDetails != null) {
|
||||
for (int k = 0; k < leaseApplyDetails.size(); k++) {
|
||||
if (leaseApplyDetails.get(k).getUserId() == null || leaseApplyDetails.get(k).getUserId() == 0) {
|
||||
leaseApplyDetails.get(k).setCount(0);
|
||||
} else {
|
||||
leaseApplyDetails.get(k).setCount(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<LeaseApplyDetails> leaseApplyDetails = leaseAuditList.get(i).getLeaseApplyInfoList().get(0).getLeaseApplyDetails();
|
||||
if (leaseApplyDetails != null) {
|
||||
List<LeaseApplyDetails> list1 = new ArrayList<>();
|
||||
for (int l = 0; l < leaseApplyDetails.size(); l++) {
|
||||
if (leaseApplyDetails.get(l).getCount() == 1) {
|
||||
list1.add(leaseApplyDetails.get(l));
|
||||
TmTask tmTask = leaseAuditList.get(i);
|
||||
tmTask.getLeaseApplyInfoList().get(0).setLeaseApplyDetails(list1);
|
||||
list.add(tmTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
}
|
||||
if (SecurityUtils.getLoginUser() != null) {
|
||||
Long userid = SecurityUtils.getLoginUser().getUserid();
|
||||
task.setUserId(String.valueOf(userid));
|
||||
}
|
||||
List<TmTask> leaseAuditList = new ArrayList<>();
|
||||
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseOutListByUser(task);
|
||||
return AjaxResult.success(getDataTable(leaseAuditList));
|
||||
}
|
||||
|
||||
|
|
@ -442,6 +452,10 @@ public class TmTaskController extends BaseController {
|
|||
return AjaxResult.error("参数错误");
|
||||
}
|
||||
startPage();
|
||||
if (SecurityUtils.getLoginUser() != null) {
|
||||
Long userid = SecurityUtils.getLoginUser().getUserid();
|
||||
task.setUserId(String.valueOf(userid));
|
||||
}
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByOne(task);
|
||||
return AjaxResult.success(getDataTable(leaseAuditList));
|
||||
}
|
||||
|
|
@ -472,7 +486,7 @@ public class TmTaskController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@Log(title = "获取领料管理-详情列表", businessType = BusinessType.QUERY)
|
||||
@Log(title = "宁夏获取领料管理-详情列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping("/getLeaseListAll")
|
||||
public TableDataInfo getLeaseListAll(@RequestParam(value = "taskId", required = false, defaultValue = "") String taskId) {
|
||||
TmTask task = new TmTask();
|
||||
|
|
@ -481,7 +495,16 @@ public class TmTaskController extends BaseController {
|
|||
return getDataTable(leaseAuditList);
|
||||
}
|
||||
|
||||
@Log(title = "获取领料申请-查看列表", businessType = BusinessType.QUERY)
|
||||
@Log(title = "重庆获取领料管理-详情列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping("/getLeaseListAllCq")
|
||||
public TableDataInfo getLeaseListAllCq(@RequestParam(value = "taskId", required = false, defaultValue = "") String taskId) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(Long.parseLong(taskId));
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseListAllCq(task);
|
||||
return getDataTable(leaseAuditList);
|
||||
}
|
||||
|
||||
@Log(title = "获取领料申请-查看/编辑列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping("/getLeaseApplyListAll")
|
||||
public TableDataInfo getLeaseApplyListAll(@RequestParam(value = "taskId", required = false, defaultValue = "") String taskId) {
|
||||
TmTask task = new TmTask();
|
||||
|
|
|
|||
|
|
@ -159,5 +159,7 @@ public class LeaseApplyInfo implements Serializable {
|
|||
|
||||
@ApiModelProperty(value="审核状态")
|
||||
private String status;
|
||||
@ApiModelProperty(value="领用类型:0 短期租赁 1长期领用")
|
||||
private String leaseType;
|
||||
|
||||
}
|
||||
|
|
@ -31,6 +31,8 @@ public class TmTask implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value="任务ID")
|
||||
private Long taskId;
|
||||
private Long parentId;
|
||||
private Integer outNum;
|
||||
|
||||
/**
|
||||
* 任务类型(定义数据字典)
|
||||
|
|
@ -51,6 +53,11 @@ public class TmTask implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value="预领料合计数")
|
||||
private int preCountNum;
|
||||
/**
|
||||
* 预领料合计数
|
||||
*/
|
||||
@ApiModelProperty(value="已出库数量")
|
||||
private int alNum;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
|
|
@ -229,4 +236,16 @@ public class TmTask implements Serializable {
|
|||
@ApiModelProperty(value="分管审批备注")
|
||||
private String deptAuditRemark;
|
||||
|
||||
@ApiModelProperty(value="领用类型:0 短期租赁 1长期领用")
|
||||
private String leaseType;
|
||||
private String userId;
|
||||
private String typeName;
|
||||
private String typeModelName;
|
||||
|
||||
private String manageType;
|
||||
private String typeId;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -108,4 +108,10 @@ public interface TmTaskMapper {
|
|||
LeaseApplyInfo getListSomeol(LeaseApplyInfo info);
|
||||
|
||||
Integer getKgByMaType(Integer typeId);
|
||||
|
||||
List<LeaseApplyDetails> getLeaseApplyDetailsCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
List<TmTask> getLeaseOutListByUser(TmTask task);
|
||||
|
||||
List<TmTask> getLeaseDetailByParentId(TmTask record);
|
||||
}
|
||||
|
|
@ -28,8 +28,10 @@ public interface TmTaskService{
|
|||
|
||||
/** 领料任务审核通过状态修改 */
|
||||
int updateLeaseTaskAuditInfo(TmTask record);
|
||||
int updateLeaseTaskAuditInfoCq(TmTask record);
|
||||
/** 领料任务审核驳回状态修改 */
|
||||
int updateLeaseTaskRejectInfo(TmTask record);
|
||||
int updateLeaseTaskRejectInfoCq(TmTask record);
|
||||
|
||||
String genderLeaseCode();
|
||||
|
||||
|
|
@ -81,4 +83,10 @@ public interface TmTaskService{
|
|||
LeaseApplyInfo getListSomeol(LeaseApplyInfo info);
|
||||
|
||||
List<TmTask> getLeaseAuditListByPeople(TmTask task);
|
||||
|
||||
List<TmTask> getLeaseAuditManageListCq(TmTask task);
|
||||
|
||||
List<TmTask> getLeaseListAllCq(TmTask task);
|
||||
|
||||
List<TmTask> getLeaseOutListByUser(TmTask task);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,43 +170,43 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateLeaseTaskAuditInfoCq(TmTask record) {
|
||||
int result = 0;
|
||||
if (StringUtils.isNotNull(record)) {
|
||||
// 内部审核
|
||||
// 管理员登录时审核
|
||||
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
||||
// 分公司审核
|
||||
// 再审核领料任务信息表
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
|
||||
if (CollUtil.isNotEmpty(leaseApplyInfoList)) {
|
||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||
if (leaseApplyInfo != null) {
|
||||
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
|
||||
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 再审核领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = record.getLeaseApplyDetails();
|
||||
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
|
||||
for (LeaseApplyDetails details : leaseApplyDetails) {
|
||||
if (StringUtils.isNotNull(details)) {
|
||||
result += tmTaskMapper.updateLeaseApplyDetailsAuditInfo(details);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取领料申请列表
|
||||
*/
|
||||
@Override
|
||||
public List<TmTask> getLeaseAuditListByOne(TmTask record) {
|
||||
List<TmTask> tmTaskList = tmTaskMapper.getAuditListByLeaseTmTask(record);
|
||||
for (TmTask tmTask : tmTaskList) {
|
||||
int count = 0;
|
||||
if (tmTask != null) {
|
||||
// 去查询任务分单表
|
||||
List<LeaseApplyInfo> auditListByLeaseInfo = tmTaskMapper.getAuditListByLeaseInfo(tmTask);
|
||||
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
||||
// 对领料任务集合查询具体详情
|
||||
for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
if (leaseApplyDetail != null) {
|
||||
// 统计预领数量
|
||||
count += leaseApplyDetail.getPreNum();
|
||||
}
|
||||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||
}
|
||||
// 塞入预领的合计数量
|
||||
tmTask.setPreCountNum(count);
|
||||
}
|
||||
}
|
||||
|
||||
List<TmTask> tmTaskList = tmTaskMapper.getLeaseDetailByParentId(record);
|
||||
return tmTaskList;
|
||||
}
|
||||
|
||||
|
|
@ -292,6 +292,70 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
return tmTaskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TmTask> getLeaseAuditManageListCq(TmTask record) {
|
||||
List<TmTask> tmTaskList = tmTaskMapper.getAuditManageListByLeaseTmTask(record);
|
||||
for (TmTask tmTask : tmTaskList) {
|
||||
int count = 0;
|
||||
if (tmTask != null) {
|
||||
// 去查询任务分单表
|
||||
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
|
||||
// 对领料任务集合查询具体详情
|
||||
for (LeaseApplyInfo leaseApplyInfo : collect) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
||||
// 统计预领数量
|
||||
count += leaseApplyDetail.getPreNum();
|
||||
}
|
||||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(collect);
|
||||
tmTask.setPreCountNum(count);
|
||||
}
|
||||
}
|
||||
List<TmTask> tmTasks = tmTaskList.stream().filter(t -> t.getLeaseApplyInfoList() != null).collect(Collectors.toList());
|
||||
return tmTasks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TmTask> getLeaseListAllCq(TmTask task) {
|
||||
List<TmTask> tmTaskList = new ArrayList<>();
|
||||
TmTask tmTask = tmTaskMapper.getLeaseListTmTask(task);
|
||||
if (tmTask != null) {
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = tmTaskMapper.getLeaseListByLeaseInfo(task);
|
||||
tmTask.setLeaseApplyInfoList(leaseApplyInfoList);
|
||||
|
||||
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsCq(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
listLeaseDetails.addAll(leaseApplyDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
tmTask.setLeaseApplyDetails(listLeaseDetails);
|
||||
}
|
||||
tmTaskList.add(tmTask);
|
||||
return tmTaskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
||||
return tmTaskMapper.getLeaseOutListByUser(task);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取领料申请列表
|
||||
|
|
@ -595,7 +659,40 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateLeaseTaskRejectInfoCq(TmTask record) {
|
||||
int result = 0;
|
||||
if (StringUtils.isNotNull(record)) {
|
||||
// 先审核任务表
|
||||
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
||||
// 分公司驳回
|
||||
// 再审核领料任务信息表
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
|
||||
if (CollUtil.isNotEmpty(leaseApplyInfoList)) {
|
||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||
if (leaseApplyInfo != null) {
|
||||
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
|
||||
result += tmTaskMapper.updateLeaseApplyInfoRejectInfo(leaseApplyInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 再审核领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = record.getLeaseApplyDetails();
|
||||
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
|
||||
for (LeaseApplyDetails details : leaseApplyDetails) {
|
||||
if (StringUtils.isNotNull(details)) {
|
||||
result += tmTaskMapper.updateLeaseApplyDetailsRejectInfo(details);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
@ -899,7 +996,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
List<LeaseApplyInfo> leaseApplyInfoList = tmTaskMapper.getLeaseListByLeaseInfo(task);
|
||||
if (task.getFlag() == 0) {
|
||||
for (LeaseApplyInfo applyInfo : leaseApplyInfoList) {
|
||||
if ("2".equals(applyInfo.getStatus()) || "4".equals(applyInfo.getStatus()) || "6".equals(applyInfo.getStatus()) || "8".equals(applyInfo.getStatus())) {
|
||||
if ("2".equals(applyInfo.getStatus()) || "4".equals(applyInfo.getStatus()) || "6".equals(applyInfo.getStatus()) || "8".equals(applyInfo.getStatus()) || "10".equals(applyInfo.getStatus())) {
|
||||
leaseApplyInfos.add(applyInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@
|
|||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
<if test="leaseType != null and leaseType != ''">
|
||||
lease_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
|
|
@ -175,6 +178,9 @@
|
|||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="leaseType != null and leaseType != ''">
|
||||
#{leaseType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@
|
|||
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
|
||||
bpl.lot_id as proId,bpl.lot_name as proName,
|
||||
bui.unit_id as unitId,bui.unit_name as unitName,
|
||||
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,
|
||||
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,
|
||||
case when d.id = '30' then lai.company_audit_remark
|
||||
when d.id = '31' then lai.dept_audit_remark
|
||||
when d.id = '32' then lai.direct_audit_remark
|
||||
|
|
@ -625,6 +625,7 @@
|
|||
su4.user_name as directAuditBy,
|
||||
lai.direct_audit_time as directAuditTime,
|
||||
lai.direct_audit_remark as directAuditRemark,
|
||||
lai.lease_type as leaseType,
|
||||
|
||||
d.id as examineStatusId,
|
||||
bai.agreement_code as agreementCode,
|
||||
|
|
@ -807,7 +808,7 @@
|
|||
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
|
||||
bpl.lot_id as proId,bpl.lot_name as proName,
|
||||
bui.unit_id as unitId,bui.unit_name as unitName,
|
||||
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,
|
||||
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,
|
||||
case when d.id = '30' then lai.company_audit_remark
|
||||
when d.id = '31' then lai.dept_audit_remark
|
||||
when d.id = '32' then lai.direct_audit_remark
|
||||
|
|
@ -866,6 +867,80 @@
|
|||
GROUP BY
|
||||
lad.id
|
||||
</select>
|
||||
<select id="getLeaseApplyDetailsCq" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
||||
SELECT
|
||||
lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,
|
||||
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
|
||||
mt.num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode
|
||||
FROM
|
||||
lease_apply_details lad
|
||||
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
LEFT JOIN ma_machine mm ON lad.type_id = mm.type_id
|
||||
WHERE
|
||||
lad.parennt_id = #{record.id}
|
||||
GROUP BY
|
||||
lad.id
|
||||
</select>
|
||||
<select id="getLeaseOutListByUser" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
SELECT
|
||||
tt.*,
|
||||
lai.id AS id,
|
||||
bpl.lot_id AS proId,
|
||||
bpl.lot_name AS proName,
|
||||
bui.unit_id AS unitId,
|
||||
bui.unit_name AS unitName,
|
||||
lai.lease_person AS leasePerson,
|
||||
lai.phone AS leasePhone,
|
||||
tt.create_by AS applyFor,
|
||||
d.`name` AS taskName,
|
||||
lai.lease_type AS leaseType,
|
||||
d.id AS examineStatusId,
|
||||
bai.agreement_code AS agreementCode,
|
||||
tt.create_time AS createTimes,
|
||||
sum(lad.pre_num) as preCountNum,
|
||||
sum(lad.al_num) as alNum,
|
||||
tt.update_time AS updateTimes
|
||||
from
|
||||
lease_apply_info lai
|
||||
LEFT JOIN tm_task tt on lai.task_id = tt.task_id
|
||||
LEFT JOIN sys_dic d ON d.id = tt.task_status
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||
LEFT JOIN lease_apply_details lad on lai.id = lad.parennt_id
|
||||
LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id
|
||||
WHERE tt.task_status in(33,34,35)
|
||||
<if test="userId != '1'">
|
||||
and mtk.user_id = #{userId}
|
||||
</if>
|
||||
GROUP BY lai.id
|
||||
ORDER BY tt.task_status
|
||||
</select>
|
||||
<select id="getLeaseDetailByParentId" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
SELECT
|
||||
lai.task_id as taskId,
|
||||
lad.id as id,
|
||||
lad.parennt_id as parentId,
|
||||
lad.pre_num - ifnull(lad.al_num,0) as outNum,
|
||||
lad.pre_num as preCountNum,
|
||||
mt2.type_name as typeName,
|
||||
mt.type_name as typeModelName,
|
||||
mt.manage_type as manageType,
|
||||
lad.type_id as typeId
|
||||
FROM
|
||||
lease_apply_details lad
|
||||
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
|
||||
LEFT JOIN ma_type mt on lad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id
|
||||
WHERE
|
||||
lad.parennt_id = #{id}
|
||||
<if test="userId != '1'">
|
||||
and mtk.user_id = #{userId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public class WorkSiteDirectManageController extends BaseController {
|
|||
if (CollUtil.isEmpty(leaseApplyDetails)) {
|
||||
return AjaxResult.error("领料出库信息为空");
|
||||
}
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = applyInfoService.selectIdByTaskId(task.getTaskId().intValue());
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = applyInfoService.selectIdByTaskId(Integer.parseInt(task.getId()));
|
||||
List<LeaseOutDetails> list = new ArrayList();
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
LeaseOutDetails leaseOutDetails = new LeaseOutDetails();
|
||||
|
|
|
|||
Loading…
Reference in New Issue