This commit is contained in:
parent
26df45d72a
commit
38c6886c25
|
|
@ -161,7 +161,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
ajaxResult.put("data", backApplyRequestVo);
|
||||
if (CollectionUtils.isNotEmpty(newCodeList)) {
|
||||
// 拼接消息内容
|
||||
StringBuffer msgBuilder = new StringBuffer("您所选择的编码设备编号 +");
|
||||
StringBuffer msgBuilder = new StringBuffer("您所选择的编码设备编号");
|
||||
for (int i = 0; i < newCodeList.size(); i++) {
|
||||
String code = newCodeList.get(i).getMaCode();
|
||||
msgBuilder.append(code);
|
||||
|
|
@ -169,7 +169,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
msgBuilder.append(", ");
|
||||
}
|
||||
}
|
||||
msgBuilder.append("+已被他人完成退料,请注意查看!");
|
||||
msgBuilder.append("已被他人完成退料,请注意查看!");
|
||||
String msg = msgBuilder.toString();
|
||||
msg = msg.replaceAll("\n","");
|
||||
ajaxResult.put("msg", msg);
|
||||
|
|
@ -725,13 +725,26 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
// 将applyInfoList中状态不为在用的数据收集到新集合中
|
||||
if (CollectionUtils.isNotEmpty(applyInfoList)) {
|
||||
for (BackApplyInfo applyInfo : applyInfoList) {
|
||||
if (StringUtils.isNotBlank(applyInfo.getMaStatus())) {
|
||||
if (!"2".equals(applyInfo.getMaStatus())) {
|
||||
codeList.add(applyInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(codeList)) {
|
||||
return AjaxResult.error("您所选择的编码设备中有设备已被他人完成退料,请编辑后重新提交!");
|
||||
StringBuilder msgBuilder = new StringBuilder("您所选择的编码设备编号");
|
||||
for (int i = 0; i < codeList.size(); i++) {
|
||||
String maCode = codeList.get(i).getMaCode();
|
||||
msgBuilder.append(maCode);
|
||||
if (i < codeList.size() - 1) {
|
||||
msgBuilder.append(", ");
|
||||
}
|
||||
}
|
||||
msgBuilder.append("已被他人完成退料,请编辑后重新提交!");
|
||||
String msg = msgBuilder.toString();
|
||||
msg = msg.replaceAll("\n", "");
|
||||
return AjaxResult.error(msg);
|
||||
}
|
||||
int result = 0;
|
||||
//先查询退料详情信息
|
||||
|
|
@ -746,7 +759,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
if (CollectionUtils.isNotEmpty(listL4)) {
|
||||
for (TypeTreeNode typeTreeNode : listL4) {
|
||||
if (applyDetail.getTypeId().equals(typeTreeNode.getTypeId())) {
|
||||
if (applyDetail.getPreNum().compareTo(applyDetail.getNum()) > 0) {
|
||||
if (applyDetail.getPreNum().compareTo(typeTreeNode.getNum()) > 0) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "退料数量不能大于在用数量");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ public class ScrapAuditInfo {
|
|||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "报废数量")
|
||||
@Excel(name = "报废数量")
|
||||
private BigDecimal scrapNum;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
@Excel(name = "原值(元)")
|
||||
private BigDecimal buyPrice;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ public class ScrapRecordInfo {
|
|||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "报废数量")
|
||||
@Excel(name = "报废数量")
|
||||
private BigDecimal scrapNum;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
@Excel(name = "原值(元)")
|
||||
private BigDecimal buyPrice;
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
|
|||
backApplyInfo.setCode(code);
|
||||
backApplyInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
backApplyInfo.setCreateTime(DateUtils.getNowDate());
|
||||
backApplyInfo.setDirectId(Long.valueOf(directApplyInfo.getId()));
|
||||
// 保存退料信息到 tm_task 表中
|
||||
int result = 0;
|
||||
result = taskMapper.insertTmTask(task);
|
||||
|
|
@ -243,6 +244,7 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
|
|||
applyInfo.setPhone(info.getLeasePhone());
|
||||
applyInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
applyInfo.setCreateTime(DateUtils.getNowDate());
|
||||
applyInfo.setDirectId(Long.valueOf(directApplyInfo.getId()));
|
||||
/** 设置审批人为默认的董班长 --防止代码冲突 **/
|
||||
int count = leaseApplyInfoMapper.insertLeaseApplyInfo(applyInfo);
|
||||
if (count > 0) {
|
||||
|
|
|
|||
|
|
@ -225,7 +225,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bcd.parent_id AS parentId,
|
||||
bcd.create_by AS createBy,
|
||||
bcd.ma_id AS maId,
|
||||
mm.ma_status AS maStatus
|
||||
mm.ma_status AS maStatus,
|
||||
mm.ma_code AS maCode
|
||||
FROM
|
||||
back_check_details bcd
|
||||
LEFT JOIN back_apply_info bai ON bai.id = bcd.parent_id
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt2.type_name AS typeName,
|
||||
mt2.type_id AS thirdTypeId,
|
||||
mt.type_name AS typeModelName,
|
||||
SUM(IF(sad.status IN ('0','1'), IFNULL(sad.scrap_num, 0), 0)) AS pendingScrapNum,
|
||||
SUM(IF(sad.ledger_status = '0', IFNULL(sad.scrap_num, 0), 0)) AS pendingScrapNum,
|
||||
SUM(IF(sad.ledger_status = '1', IFNULL(sad.scrap_num, 0), 0)) AS scrapNum
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
|
|
@ -634,7 +634,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN tm_task tt ON bs.task_id = tt.task_id
|
||||
LEFT JOIN ma_type_keeper mtk ON mtk.type_id = bs.type_id
|
||||
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
|
||||
WHERE bs.in_num != 0 and bs.result_msg = '操作成功'
|
||||
WHERE bs.in_num != 0 and (bs.result_msg = '操作成功' OR bs.result_msg = '入库成功')
|
||||
<if test="typeId != null">
|
||||
AND bs.type_id = #{typeId}
|
||||
</if>
|
||||
|
|
@ -835,13 +835,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHEN '3' then '盘点报废'
|
||||
ELSE ''
|
||||
END
|
||||
as scrapType
|
||||
as scrapType,
|
||||
sad.scrap_num AS scrapNum
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
|
||||
LEFT JOIN sys_user su ON sad.audit_by = su.user_id
|
||||
WHERE 1 = 1
|
||||
WHERE sad.ledger_status = '0'
|
||||
<if test="typeId != null">
|
||||
AND sad.type_id = #{typeId}
|
||||
</if>
|
||||
|
|
@ -855,6 +856,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_code ,mt.type_id
|
||||
ORDER BY sad.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getScrapAuditList" resultType="com.bonus.material.basic.domain.ScrapAuditInfo">
|
||||
|
|
@ -872,7 +874,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHEN '3' then '盘点报废'
|
||||
ELSE ''
|
||||
END
|
||||
as scrapType
|
||||
as scrapType,
|
||||
sad.scrap_num AS scrapNum
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
|
|
@ -893,6 +896,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_code ,mt.type_id
|
||||
ORDER BY sad.ledger_time DESC
|
||||
</select>
|
||||
<select id="getMaTypeSelectList" resultType="com.bonus.material.basic.domain.vo.MaTypeSelectInfo">
|
||||
(
|
||||
|
|
|
|||
Loading…
Reference in New Issue