工地直转点击通过

This commit is contained in:
sxu 2024-08-23 12:01:41 +08:00
parent 15ccee2af1
commit 9b67c44fe4
3 changed files with 7 additions and 8 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

@ -13,7 +13,6 @@ import com.bonus.sgzb.material.service.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -179,7 +178,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("领料出库失败,请检查参数是否填写完整!");
@ -187,9 +186,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>