|
@@ -1,5 +1,6 @@
|
|
|
package com.steerinfo.dil.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.steerinfo.dil.mapper.RmsMaterialMapper;
|
|
|
import com.steerinfo.dil.mapper.RmsMaterialTypeMapper;
|
|
|
import com.steerinfo.dil.mapper.RmsUnitOfMeasureMapper;
|
|
@@ -7,9 +8,11 @@ import com.steerinfo.dil.model.RmsMaterial;
|
|
|
import com.steerinfo.dil.model.RmsMaterialType;
|
|
|
import com.steerinfo.dil.model.RmsUnitOfMeasure;
|
|
|
import com.steerinfo.dil.service.IRmsMaterialService;
|
|
|
+import com.steerinfo.dil.util.newFileTool;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
@@ -46,6 +49,20 @@ public class RmsMaterialServiceImpl implements IRmsMaterialService {
|
|
|
*/
|
|
|
@Override
|
|
|
public int operationMaterial(Map<String, Object> mapVal) {
|
|
|
+ try{
|
|
|
+ new Thread( new Runnable() {
|
|
|
+ public void run(){
|
|
|
+ try {
|
|
|
+ JSONObject jsonObject = new JSONObject(mapVal);
|
|
|
+ newFileTool.newFile(jsonObject.toString(),"金蝶同步物流物资");
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).start();
|
|
|
+ }catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
// 得到金蝶物资主键id
|
|
|
String EASMaterialId = (String) mapVal.get("EASMaterialId");
|
|
|
// 得到物资唯一编码
|
|
@@ -79,6 +96,7 @@ public class RmsMaterialServiceImpl implements IRmsMaterialService {
|
|
|
map2.put("materialTypeName",materialTypeName);
|
|
|
List<RmsMaterialType> rmsMaterialTypes = rmsMaterialTypeMapper.selectByParameters(map2);
|
|
|
RmsMaterial rmsMaterial = new RmsMaterial();
|
|
|
+
|
|
|
if (rmsMaterialTypes.size() == 0) {
|
|
|
RmsMaterialType rmsMaterialType = new RmsMaterialType();
|
|
|
rmsMaterialType.setMaterialTypeId(rmsMaterialTypeMapper.getMaterialId());
|