|
|
|
|
@ -11,6 +11,7 @@ import com.nov.KgLowDurable.mapper.LdTwoInventoryRecordMapper; |
|
|
|
|
import com.nov.KgLowDurable.pojo.dto.ApproveDto; |
|
|
|
|
import com.nov.KgLowDurable.pojo.entity.*; |
|
|
|
|
import com.nov.KgLowDurable.service.*; |
|
|
|
|
import com.nov.KgLowDurable.util.Func; |
|
|
|
|
import com.nov.KgLowDurable.util.StringUtils; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
@ -138,8 +139,14 @@ public class LdTwoInventoryRecordServiceImpl extends ServiceImpl<LdTwoInventoryR |
|
|
|
|
|
|
|
|
|
List<LdErstockOutForm> outFormList = ldErstockOutFromService.listByOutId(approveDto.getTwoOutStorageId()); |
|
|
|
|
for (LdErstockOutForm ldErstockOutForm : outFormList) { |
|
|
|
|
// todo 移动端的类存储的是代码(YH)还是汉字(易耗品)
|
|
|
|
|
if (BatchConstant.CONSUMER.equals(ldErstockOutForm.getType())) { |
|
|
|
|
// 物资编码
|
|
|
|
|
String code = ""; |
|
|
|
|
// 需要类别的话可以根据stock_id物资编码来判断,编码中第六七位会有NY或YH
|
|
|
|
|
if (Func.isNotEmpty(ldErstockOutForm.getStockId())) { |
|
|
|
|
code = ldErstockOutForm.getStockId().substring(5, 7); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (BatchConstant.CONSUMER.equals(code)) { |
|
|
|
|
// 获取二级库存
|
|
|
|
|
LdConsumerForm consumerForm = consumerFormService.getById(ldErstockOutForm.getStockId()); |
|
|
|
|
BigDecimal num = new BigDecimal(ldErstockOutForm.getNum()); |
|
|
|
|
|