opt:优化领料单和生成入库单批号,辅助单位,手工录入等情况数据发送
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.flow_manage.flow.service.classprocessimpl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -65,7 +66,6 @@ public class SyncReceiptProcessHandler implements ClassProcess {
|
||||
if (StringUtils.isEmpty(formid)) {
|
||||
throw new BadRequestException("回传失败:回传数据form_data中数据格式不是formid,data类型");
|
||||
}
|
||||
|
||||
handleBillEntity(pmFormData.getForm_type(), formData);
|
||||
String json = formData.toJSONString();
|
||||
try {
|
||||
@@ -113,7 +113,7 @@ public class SyncReceiptProcessHandler implements ClassProcess {
|
||||
private void handleBillEntity(String formType, JSONObject formData) {
|
||||
JSONArray fEntityArray = formData.getJSONObject("Model").getJSONArray("FEntity");
|
||||
//判断生产入库的手工录入与MRP生成方式需回传不同的源单信息
|
||||
if ("0".equals(formData.getString("FSrcEntryId")) && "PRD_INSTOCK".equals(formType)) {
|
||||
if ("0".equals(formData.getString("FSrcEntryId")) && "RECEIPT_PRD".equals(formType)) {
|
||||
//查询工序汇报单
|
||||
ErpQuery reportQuery = new ErpQuery();
|
||||
reportQuery.setFilterString("FMoNumber ='" + formData.getString("moNumber") + "'");
|
||||
@@ -142,11 +142,11 @@ public class SyncReceiptProcessHandler implements ClassProcess {
|
||||
}
|
||||
}
|
||||
//判断生产领料单的批次与辅助单位
|
||||
if ("PRD_PickMtrl".equals(formType)) {
|
||||
if ("RECEIPT_PickMtrl".equals(formType)) {
|
||||
for (int i = 0; i < fEntityArray.size(); i++) {
|
||||
List<MdMeMaterialbase> materialList = iMdMeMaterialbaseService.list(new LambdaQueryWrapper<MdMeMaterialbase>().eq(MdMeMaterialbase::getMaterial_id, formData.getString("material_id")));
|
||||
MdMeMaterialbase materialInfo = materialList.get(0);
|
||||
JSONObject fEntity = fEntityArray.getJSONObject(i);
|
||||
List<MdMeMaterialbase> materialList = iMdMeMaterialbaseService.list(new LambdaQueryWrapper<MdMeMaterialbase>().eq(MdMeMaterialbase::getMaterial_code,JSON.parseObject(fEntity.getString("FMaterialId")).getString("FNumber") ));
|
||||
MdMeMaterialbase materialInfo = materialList.get(0);
|
||||
//没有启用批次号
|
||||
if ("0".equals(materialInfo.getPrint_no())) {
|
||||
if (fEntity.containsKey("FLot")) {
|
||||
|
||||
@@ -81,7 +81,7 @@ public class MdGruopDickServiceImpl extends ServiceImpl<MdGruopDickMapper, MdGru
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void groupDick(JSONObject forms) {
|
||||
List<Map> tableData = (List)forms.remove("item");
|
||||
if (CollectionUtils.isEmpty(forms)){
|
||||
@@ -171,6 +171,7 @@ public class MdGruopDickServiceImpl extends ServiceImpl<MdGruopDickMapper, MdGru
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void excelImport(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
|
||||
Reference in New Issue
Block a user