退料接收返回库管员
This commit is contained in:
parent
4293d5a562
commit
ae2837fed9
|
|
@ -29,4 +29,13 @@ public class RepairTestInputDto{
|
||||||
|
|
||||||
private String params;
|
private String params;
|
||||||
|
|
||||||
|
/** 维修数量 */
|
||||||
|
private int repairNum;
|
||||||
|
|
||||||
|
/** 操作前库存 */
|
||||||
|
private int preStoreNum;
|
||||||
|
|
||||||
|
/** 操作后库存 */
|
||||||
|
private int postStoreNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -329,13 +329,9 @@ public class LogAspect
|
||||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||||
bmStorageLog.setTaskId(String.valueOf(rti.getTaskId()));
|
bmStorageLog.setTaskId(String.valueOf(rti.getTaskId()));
|
||||||
bmStorageLog.setTypeId(Integer.parseInt(rti.getTypeId()));
|
bmStorageLog.setTypeId(Integer.parseInt(rti.getTypeId()));
|
||||||
// bmStorageLog.setTypeName(rti.getMaCode());
|
bmStorageLog.setPreStoreNum(rti.getPreStoreNum());
|
||||||
// bmStorageLog.setPreStoreNum(Integer.parseInt(rti.getNum()));
|
bmStorageLog.setInNum(rti.getRepairNum());
|
||||||
// bmStorageLog.setBackNum(rti.getBackNum());
|
bmStorageLog.setPostStoreNum(rti.getPostStoreNum());
|
||||||
// bmStorageLog.setPassNum(rti.getPassNum());
|
|
||||||
// bmStorageLog.setMaintenanceNum(rti.getMaintenanceNum());
|
|
||||||
// bmStorageLog.setScrapNum(rti.getScrapNum());
|
|
||||||
// bmStorageLog.setPostStoreNum(rti.getPostStoreNum());
|
|
||||||
bmStorageLogList.add(bmStorageLog);
|
bmStorageLogList.add(bmStorageLog);
|
||||||
}
|
}
|
||||||
// 二级库出入库, 不影响ma_type库存变化,暂时不加库存监控日志
|
// 二级库出入库, 不影响ma_type库存变化,暂时不加库存监控日志
|
||||||
|
|
|
||||||
|
|
@ -122,4 +122,6 @@ public interface RepairTestInputMapper {
|
||||||
List<RepairTestInputDetailVo> exportList(RepairTestInputDto bean);
|
List<RepairTestInputDetailVo> exportList(RepairTestInputDto bean);
|
||||||
|
|
||||||
int addRepaieAudit(RepairAuditDetails bean);
|
int addRepaieAudit(RepairAuditDetails bean);
|
||||||
|
|
||||||
|
int getCountOfMachineByTypeId(String typeId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,11 +114,25 @@ public class RepairTestInputServiceImpl implements RepairTestInputService {
|
||||||
String repairNum = StringUtils.isNotEmpty(dto.getRepairNum()) ? dto.getRepairNum() : "0";
|
String repairNum = StringUtils.isNotEmpty(dto.getRepairNum()) ? dto.getRepairNum() : "0";
|
||||||
double num = countNum(map.get("num"), repairNum);
|
double num = countNum(map.get("num"), repairNum);
|
||||||
mapper.updateMaTypeNum(dto.getTypeId(), num);
|
mapper.updateMaTypeNum(dto.getTypeId(), num);
|
||||||
|
int codeMachinePreStoreNum = 0;
|
||||||
if (Objects.equals("0", dto.getType())) {
|
if (Objects.equals("0", dto.getType())) {
|
||||||
|
codeMachinePreStoreNum = mapper.getCountOfMachineByTypeId(dto.getTypeId());
|
||||||
// 查询机具状态-在库的id、管理方式为编号的需更新机具设备的机具状态
|
// 查询机具状态-在库的id、管理方式为编号的需更新机具设备的机具状态
|
||||||
int dicId = mapper.getDicByMaStatusId("ma_status", "在库");
|
int dicId = mapper.getDicByMaStatusId("ma_status", "在库");
|
||||||
mapper.updateMaMachineStatus(dicId, dto.getMaId());
|
mapper.updateMaMachineStatus(dicId, dto.getMaId());
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
repairTestInputDto.setRepairNum(Integer.parseInt(repairNum));
|
||||||
|
if (Objects.equals("0", dto.getType())) {
|
||||||
|
repairTestInputDto.setPreStoreNum(codeMachinePreStoreNum);
|
||||||
|
repairTestInputDto.setPostStoreNum(mapper.getCountOfMachineByTypeId(dto.getTypeId()));
|
||||||
|
} else {
|
||||||
|
repairTestInputDto.setPreStoreNum((Integer) map.get("num"));
|
||||||
|
repairTestInputDto.setPostStoreNum((int) num);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("修试后入库-入库操作-获取库存日志失败", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RepairTestWarehousingDto dto = list.get(0);
|
RepairTestWarehousingDto dto = list.get(0);
|
||||||
|
|
|
||||||
|
|
@ -259,4 +259,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
values (#{taskId},#{repairId},#{maId},#{typeId},#{repairNum},#{repairedNum},#{scrapNum},#{status},#{createBy},now(),#{updateBy},now(),#{companyId});
|
values (#{taskId},#{repairId},#{maId},#{typeId},#{repairNum},#{repairedNum},#{scrapNum},#{status},#{createBy},now(),#{updateBy},now(),#{companyId});
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="getCountOfMachineByTypeId" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(mm.ma_id)
|
||||||
|
FROM ma_machine mm
|
||||||
|
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
WHERE mm.ma_code is not null and mm.ma_status in (15)
|
||||||
|
AND mt.type_id = #{typeId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue