新购标准箱接口修改
This commit is contained in:
parent
d0d2904e15
commit
6482651111
|
|
@ -787,7 +787,15 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
|
|||
private int updateStorageNum(BoxBindWarehouseDto boxMa) {
|
||||
|
||||
int result = 0;
|
||||
result = bmQrBoxMapper.updateStorageNum(boxMa);
|
||||
|
||||
|
||||
String maStatus = boxMa.getMaStatus();
|
||||
if("0".equals(maStatus)){
|
||||
boxMa.setInputNum(BigDecimal.valueOf(1));
|
||||
result = bmQrBoxMapper.updateStorageNum(boxMa);
|
||||
result = machineMapper.updateMaStatus(boxMa);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.material.basic.domain.BmQrBoxInfo;
|
||||
import com.bonus.material.basic.domain.dto.BoxBindWarehouseDto;
|
||||
import com.bonus.material.ma.domain.Machine;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.domain.vo.MachineVo;
|
||||
|
|
@ -222,4 +223,6 @@ public interface MachineMapper
|
|||
int batchUpdateSynchReport(@Param("list") List<SampleSync> samples);
|
||||
|
||||
int editMachineStatus(Machine machine);
|
||||
|
||||
int updateMaStatus(BoxBindWarehouseDto boxMa);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<update id="updateStorageNum">
|
||||
update ma_type set storage_num = storage_num + #{inputNum} where type_id = #{maTypeId}
|
||||
update ma_type set storage_num = ifnull(storage_num,0) + #{inputNum} where type_id = #{maTypeId}
|
||||
</update>
|
||||
|
||||
<update id="updateBoxStatus">
|
||||
|
|
|
|||
|
|
@ -990,4 +990,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join bm_project bp on bai.project_id = bp.pro_id
|
||||
where ba.id = #{parentId}
|
||||
</select>
|
||||
|
||||
<update id="updateMaStatus">
|
||||
update ma_machine set ma_status = 1 where ma_id = #{maId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue