Merge branch 'dev-nwcc' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nwcc

This commit is contained in:
BianLzhaoMin 2024-07-18 18:17:52 +08:00
commit e9fa9c20cb
3 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ public interface WorkSiteDirectManageMapper {
int batchDel(@Param("ids") ArrayList<Integer> ids); int batchDel(@Param("ids") ArrayList<Integer> ids);
String getMachineStatus(LeaseOutDetails leaseOutDetails); DirectApplyInfo getMachineStatus(LeaseOutDetails leaseOutDetails);
int updateLeaseApplyDetailsOutNum(@Param("record")LeaseOutDetails leaseOutDetails); int updateLeaseApplyDetailsOutNum(@Param("record")LeaseOutDetails leaseOutDetails);

View File

@ -183,7 +183,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertLeaseOutDetail(List<LeaseOutDetails> leaseOutDetails, TmTask lTask) { public int insertLeaseOutDetail(List<LeaseOutDetails> leaseOutDetails, TmTask lTask) {
int res = 0; int res = 0;
String maStatus = "15"; String maStatus = "16";
double outNum = 0.1; double outNum = 0.1;
if (StringUtils.isNull(leaseOutDetails)) { if (StringUtils.isNull(leaseOutDetails)) {
log.info("领料出库失败,请检查参数是否填写完整!"); log.info("领料出库失败,请检查参数是否填写完整!");
@ -191,9 +191,9 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
} }
for (LeaseOutDetails leaseOutDetail : leaseOutDetails) { for (LeaseOutDetails leaseOutDetail : leaseOutDetails) {
if (!(Objects.equals(Integer.valueOf(0), leaseOutDetail.getMaId()) || leaseOutDetail.getMaId() == null)) { if (!(Objects.equals(Integer.valueOf(0), leaseOutDetail.getMaId()) || leaseOutDetail.getMaId() == null)) {
String status = workSiteDirectManageMapper.getMachineStatus(leaseOutDetail); DirectApplyInfo directApplyInfo = workSiteDirectManageMapper.getMachineStatus(leaseOutDetail);
if (!maStatus.equals(status)) { if (!maStatus.equals(directApplyInfo.getStatus())) {
log.info("领料出库失败,该设备不是在库状态!"); log.info("领料出库失败,该设备不是再用状态!");
return res; return res;
} }
} }

View File

@ -431,8 +431,8 @@
<select id="getDirectApplyInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo"> <select id="getDirectApplyInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
select * from direct_apply_info where id = #{id} select * from direct_apply_info where id = #{id}
</select> </select>
<select id="getMachineStatus" resultType="java.lang.String"> <select id="getMachineStatus" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
select ma_status select ma_status as status
from ma_machine from ma_machine
where ma_id = #{maId} where ma_id = #{maId}
</select> </select>