领料出库代码提交
This commit is contained in:
parent
b032265b84
commit
026598a082
|
|
@ -253,6 +253,8 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
String status = leaseOutDetailsMapper.getMachineStatus(record);
|
String status = leaseOutDetailsMapper.getMachineStatus(record);
|
||||||
if (!maStatus.equals(status)) {
|
if (!maStatus.equals(status)) {
|
||||||
return res;
|
return res;
|
||||||
|
} else {
|
||||||
|
res = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建审批流领料申请
|
* 创建审批流领料申请
|
||||||
|
*
|
||||||
* @param task 任务信息
|
* @param task 任务信息
|
||||||
* @return 执行结果
|
* @return 执行结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -245,7 +246,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
return AjaxResult.error("当前任务类型审批流配置为空,请联系管理员");
|
return AjaxResult.error("当前任务类型审批流配置为空,请联系管理员");
|
||||||
}
|
}
|
||||||
// 审批流排序
|
// 审批流排序
|
||||||
if (!copeOrderByField(bmFlowRelationList)) { return AjaxResult.error("审批流排序失败,请联系管理员"); }
|
if (!copeOrderByField(bmFlowRelationList)) {
|
||||||
|
return AjaxResult.error("审批流排序失败,请联系管理员");
|
||||||
|
}
|
||||||
// 获取起始节点状态
|
// 获取起始节点状态
|
||||||
String flowStartTaskStatus = bmFlowRelationList.get(0).getTaskStatus();
|
String flowStartTaskStatus = bmFlowRelationList.get(0).getTaskStatus();
|
||||||
// 设置任务状态为审批流的起点状态
|
// 设置任务状态为审批流的起点状态
|
||||||
|
|
@ -254,17 +257,25 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
// 生成领料编码
|
// 生成领料编码
|
||||||
String code = this.genderLeaseCode();
|
String code = this.genderLeaseCode();
|
||||||
if (StringUtils.isEmpty(code)) { return AjaxResult.error("后台生成CODE编号异常,请重试!"); }
|
if (StringUtils.isEmpty(code)) {
|
||||||
|
return AjaxResult.error("后台生成CODE编号异常,请重试!");
|
||||||
|
}
|
||||||
task.setCode(code);
|
task.setCode(code);
|
||||||
|
|
||||||
// 创建任务
|
// 创建任务
|
||||||
if (this.insertSelective(task) < 1) { return AjaxResult.error("创建领料任务失败,请重试!"); }
|
if (this.insertSelective(task) < 1) {
|
||||||
|
return AjaxResult.error("创建领料任务失败,请重试!");
|
||||||
|
}
|
||||||
//任务与协议建立关联关系
|
//任务与协议建立关联关系
|
||||||
if (this.insertAgreement(task) < 1) { return AjaxResult.error("领料任务与协议建立关联关系失败,请重试!"); }
|
if (this.insertAgreement(task) < 1) {
|
||||||
|
return AjaxResult.error("领料任务与协议建立关联关系失败,请重试!");
|
||||||
|
}
|
||||||
|
|
||||||
// 获取任务编号
|
// 获取任务编号
|
||||||
String taskId = task.getId();
|
String taskId = task.getId();
|
||||||
if (StringUtils.isEmpty(taskId)) {return AjaxResult.error("任务编号为空,创建失败");}
|
if (StringUtils.isEmpty(taskId)) {
|
||||||
|
return AjaxResult.error("任务编号为空,创建失败");
|
||||||
|
}
|
||||||
|
|
||||||
// 处理任务数据,实例化至DB
|
// 处理任务数据,实例化至DB
|
||||||
R<String> taskDataCopeResult = leaseTaskDataCope(task, code, taskId, bmFlowRelationList.size());
|
R<String> taskDataCopeResult = leaseTaskDataCope(task, code, taskId, bmFlowRelationList.size());
|
||||||
|
|
@ -286,7 +297,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
try {
|
try {
|
||||||
bmFlowRecord.setTaskId(Integer.valueOf(taskId));
|
bmFlowRecord.setTaskId(Integer.valueOf(taskId));
|
||||||
bmFlowRecord.setFlowId(bmFlowRelationList.get(0).getFlowId());
|
bmFlowRecord.setFlowId(bmFlowRelationList.get(0).getFlowId());
|
||||||
if (bmFlowRelationList.size() > 1) { bmFlowRecord.setNextFlowId(bmFlowRelationList.get(1).getFlowId());}
|
if (bmFlowRelationList.size() > 1) {
|
||||||
|
bmFlowRecord.setNextFlowId(bmFlowRelationList.get(1).getFlowId());
|
||||||
|
}
|
||||||
// String loginUserName = SecurityUtils.getLoginUser().getSysUser().getUserName();
|
// String loginUserName = SecurityUtils.getLoginUser().getSysUser().getUserName();
|
||||||
// bmFlowRecord.setCreator(loginUserName == null ? "" : loginUserName);
|
// bmFlowRecord.setCreator(loginUserName == null ? "" : loginUserName);
|
||||||
bmFlowRecordService.insertSelective(bmFlowRecord);
|
bmFlowRecordService.insertSelective(bmFlowRecord);
|
||||||
|
|
@ -352,6 +365,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审批流排序
|
* 审批流排序
|
||||||
|
*
|
||||||
* @param bmFlowRelationList 审批流数据集合
|
* @param bmFlowRelationList 审批流数据集合
|
||||||
* @return 排序结果
|
* @return 排序结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -368,6 +382,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据任务入参查询审批流信息
|
* 根据任务入参查询审批流信息
|
||||||
|
*
|
||||||
* @param task 任务
|
* @param task 任务
|
||||||
* @return 审批流数据集合
|
* @return 审批流数据集合
|
||||||
*/
|
*/
|
||||||
|
|
@ -525,7 +540,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
public List<TmTask> getLeaseOutListByUser(TmTask task) {
|
||||||
return tmTaskMapper.getLeaseOutListByUser(task);
|
return tmTaskMapper.getLeaseOutListByUser(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,19 +42,19 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="getDetailsByApplyId" resultType="com.bonus.sgzb.app.domain.TmTask">
|
<select id="getDetailsByApplyId" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||||
SELECT
|
SELECT
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
mt.type_name AS typeModelName,
|
mt.type_name AS typeModelName,
|
||||||
mt.type_id AS typeId,
|
mt.type_id AS typeId,
|
||||||
mm.ma_code AS maCode,
|
mm.ma_code AS maCode,
|
||||||
mm.ma_id AS maId,
|
mm.ma_id AS maId,
|
||||||
sd.NAME AS maStatus
|
sd.NAME AS maStatus
|
||||||
FROM
|
FROM
|
||||||
ma_type mt
|
ma_type mt
|
||||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||||
LEFT JOIN ma_machine mm ON mt.type_id = mm.type_id
|
LEFT JOIN ma_machine mm ON mt.type_id = mm.type_id
|
||||||
LEFT JOIN sys_dic sd ON sd.id = mm.ma_status
|
LEFT JOIN sys_dic sd ON sd.id = mm.ma_status
|
||||||
WHERE
|
WHERE
|
||||||
mm.ma_status = 15
|
mm.ma_status in ('15','16')
|
||||||
AND mt.type_id = #{typeId}
|
AND mt.type_id = #{typeId}
|
||||||
<if test="maCode != null and maCode !=''">
|
<if test="maCode != null and maCode !=''">
|
||||||
AND mm.ma_code like concat('%', #{maCode}, '%')
|
AND mm.ma_code like concat('%', #{maCode}, '%')
|
||||||
|
|
|
||||||
|
|
@ -902,8 +902,8 @@
|
||||||
d.id AS examineStatusId,
|
d.id AS examineStatusId,
|
||||||
bai.agreement_code AS agreementCode,
|
bai.agreement_code AS agreementCode,
|
||||||
tt.create_time AS createTimes,
|
tt.create_time AS createTimes,
|
||||||
sum(lad.pre_num) as preCountNum,
|
IFNULL(sum(lad.pre_num),0) as preCountNum,
|
||||||
sum(lad.al_num) as alNum,
|
IFNULL(sum(lad.al_num),0) as alNum,
|
||||||
tt.update_time AS updateTimes
|
tt.update_time AS updateTimes
|
||||||
from
|
from
|
||||||
lease_apply_info lai
|
lease_apply_info lai
|
||||||
|
|
@ -941,7 +941,7 @@
|
||||||
lad.parennt_id as parentId,
|
lad.parennt_id as parentId,
|
||||||
lad.pre_num - ifnull(lad.al_num,0) as outNum,
|
lad.pre_num - ifnull(lad.al_num,0) as outNum,
|
||||||
lad.pre_num as preCountNum,
|
lad.pre_num as preCountNum,
|
||||||
lad.al_num as alNum,
|
ifnull(lad.al_num,0) as alNum,
|
||||||
mt2.type_name as typeName,
|
mt2.type_name as typeName,
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,7 @@ public class BackApplyInfo extends BaseEntity {
|
||||||
|
|
||||||
private String guigeCn;
|
private String guigeCn;
|
||||||
private String preNum;
|
private String preNum;
|
||||||
|
private String auditNum;
|
||||||
private String typeCn;
|
private String typeCn;
|
||||||
/** 前端条件查询所传工程id */
|
/** 前端条件查询所传工程id */
|
||||||
private String proId;
|
private String proId;
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,8 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
for (BackApplyInfo leaseApplyDetails : leaseApplyDetailsList) {
|
for (BackApplyInfo leaseApplyDetails : leaseApplyDetailsList) {
|
||||||
//设置领料任务ID
|
//设置领料任务ID
|
||||||
leaseApplyDetails.setId(backApplyInfoId);
|
leaseApplyDetails.setId(backApplyInfoId);
|
||||||
|
leaseApplyDetails.setNum(leaseApplyDetails.getDirectNum().toString());
|
||||||
|
leaseApplyDetails.setAuditNum(leaseApplyDetails.getDirectNum().toString());
|
||||||
// 插入领料任务明细
|
// 插入领料任务明细
|
||||||
boolean addLeaseTaskDetailsResult = backApplyService.upload(leaseApplyDetails) > 0;
|
boolean addLeaseTaskDetailsResult = backApplyService.upload(leaseApplyDetails) > 0;
|
||||||
if (!addLeaseTaskDetailsResult) {
|
if (!addLeaseTaskDetailsResult) {
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
company_id,
|
company_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="auditNum != null">
|
||||||
|
audit_num,
|
||||||
|
</if>
|
||||||
create_time
|
create_time
|
||||||
)
|
)
|
||||||
values (
|
values (
|
||||||
|
|
@ -239,6 +242,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
#{companyId},
|
#{companyId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="auditNum != null">
|
||||||
|
#{auditNum},
|
||||||
|
</if>
|
||||||
NOW()
|
NOW()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue