提交 52a89e2b authored 作者: 李炎's avatar 李炎

改bug

上级 ca160c18
package org.jeecg.modules.iost.API.ExternalInterface.Interface;
import net.sf.json.JSONObject;
import java.util.Map;
public interface API {
public String add(Map<String, String> map);
public String select();
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 供应商重点原材料库存
*/
@Service
public class MaterialinventoryApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/eipmatinventory/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
Map<String,String> hreader = new HashMap<>();
public MaterialinventoryApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
hreader.put("operatetype", "add");
String result = null;
try {
result = HttpUtil.post(url+"add", JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 实物ID信息
*/
@Component
public class PhysicalIDApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/entity-maintenance/";
// private String url = "http://localhost:8080/wmssystem/API/entity-maintenance/";
private List<Map<String, Object>> lists = new ArrayList<Map<String, Object>>();
Map<String, String> hreader = new HashMap<>();
public PhysicalIDApi() {
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type", "application/json");
}
@Override
public String add(Map<String, String> map) {
hreader.put("operatetype", "add");
String result = null;
try {
result = HttpUtil.post(url + "add", JsonUtil.Mapjson(map), hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader, null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 产成品库存信息
*/
@Component
public class ProductInventoryApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/eip-prod-store/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
Map<String,String> hreader = new HashMap<>();
public ProductInventoryApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
hreader.put("operatetype", "add");
String result = null;
try {
result = HttpUtil.post(url+"add", JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 生产订单
*/
@Component
public class ProductionOrderApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/supplier-ipo/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
private Map<String, String> hreader = new HashMap<>();
public ProductionOrderApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
hreader.put("operatetype","add");
String result = null;
try {
result = HttpUtil.post(url+"add", JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 排产计划
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Component
public class ProductionSchedulingApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/supplier-production-schedule/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
Map<String,String> hreader=new HashMap<>();
public ProductionSchedulingApi()
{
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
hreader.put("operatetype","add");
String result = null;
try {
result = HttpUtil.post(url+"add", JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
hreader.put("operatetype","select");
String result = HttpUtils.getRequest(url+"list", hreader, null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
public class PurchaseorderApi implements API {
// @Value("${jeecg.uri.api}")
// private String apiUri;
// private String url = "http://localhost:8080/wmssystem/API/supplier-send/";
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/supplier-send/";
private List<Map<String, Object>> lists = new ArrayList<Map<String, Object>>();
private Map<String, String> hreader = new HashMap<>();
public PurchaseorderApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("X-Access-Token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjY0MDkyMDAsInVzZXJuYW1lIjoiYWRtaW4ifQ.bERvQx5MmxZdtwcM6NqI9yng95EPmhF9OgtUBBIyOqs");
}
@Override
public String add(Map<String, String> map) {
return null;
}
@Override
public String select() {
hreader.put("operatetype", "QUERY");
String result = HttpUtils.getRequest(url + "select", hreader, null);
return result;
}
public String selectList(Map map) throws IOException {
hreader.put("Content-Type","application/json;charset=utf-8");//格式 传参json
hreader.put("operatetype", "QUERY");
String mapjson = JsonUtil.Mapjson(map);
String result =HttpUtil.post(url + "queryByDate", JsonUtil.Mapjson(map),hreader);
// System.out.println(result);
return result;
}
public String selectList(String map) throws IOException {
hreader.put("Content-Type","application/json;charset=utf-8");//格式 传参json
hreader.put("operatetype", "QUERY");
String result =HttpUtil.post(url + "queryByDate", map,hreader);
// System.out.println(result);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @Description: 报工信息
*/
@Component
public class ReportWorkApi implements API {
private String url = "http://www.lingqingkeji.com/wmssystem/API/eip-prod-store/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
Map<String,String> hreader ;
@Override
public String add(Map<String,String> map) {
String result = HttpUtils.postRequest(url, hreader,null);
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 备品备件库存
*/
@Component
public class ReserveStockApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/eip_spare_product/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
private Map<String, String> hreader = new HashMap<>();
public ReserveStockApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
hreader.put("operatetype","add");
String result = null;
try {
result = HttpUtil.post(url+"add", JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 销售订单API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Component
public class SalesOrderApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/supplier-so/";
private List<Map<String, Object>> lists = new ArrayList<Map<String, Object>>();
private Map<String, String> hreader = new HashMap<>();
public SalesOrderApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
hreader.put("operatetype","add");
String result = null;
try {
result = HttpUtil.post(url+"add",JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
hreader.put("operatetype","select");
String result = HttpUtils.getRequest(url+"list", hreader, null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtil;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.jeecg.modules.iost.API.Util.JsonUtil;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 供货单信息
*/
@Component
public class SupplyListIApi implements API {
private String url = "http://www.lingqingkeji.com:8080/wmssystem/API/supply-add/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
private Map<String, String> hreader = new HashMap<>();
public SupplyListIApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("Content-Type","application/json");
}
@Override
public String add(Map<String,String> map) {
String result = null;
try {
result = HttpUtil.post(url+"add", JsonUtil.Mapjson(map),hreader);
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.ExternalInterface.Util;
import org.jeecg.modules.iost.API.service.PhysicalidService;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.PostConstruct;
public class ApiLog {
@Autowired
PhysicalidService Journal;
private static ApiLog uploadRooms;
@PostConstruct
public void init() {
uploadRooms = this;
uploadRooms.Journal = this.Journal;
}
public boolean setJournal() {
boolean ny = false;
return ny;
}
}
package org.jeecg.modules.iost.API.ExternalInterface;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.Util.HttpUtils;
import org.jeecg.modules.iost.API.ExternalInterface.Interface.API;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 工单信息
*/
@Component
public class WorkOrderApi implements API {
private String url = "http://www.lingqingkeji.com/wmssystem/API/eip-prod-store/";
private List<Map<String, Object>> lists = new ArrayList<Map<String,Object>>();
Map<String,String> hreader = new HashMap<>();
public WorkOrderApi(){
hreader.put("transno", "201910086843218<Az2eV3>");
hreader.put("orisys", "0");
hreader.put("X-Access-Token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjY0MDkyMDAsInVzZXJuYW1lIjoiYWRtaW4ifQ.bERvQx5MmxZdtwcM6NqI9yng95EPmhF9OgtUBBIyOqs");
}
@Override
public String add(Map<String,String> map) {
String result = HttpUtils.postRequest(url, hreader,null);
return result;
}
@Override
public String select() {
String result = HttpUtils.getRequest(url, hreader,null);
return result;
}
}
package org.jeecg.modules.iost.API.TimedTask;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.ExternalInterface.MaterialinventoryApi;
import org.jeecg.modules.iost.API.entity.Materialinventoryerror;
import org.jeecg.modules.iost.API.service.IMaterialinventoryService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
@Slf4j
@Component
@EnableScheduling
/**
* 重点 材料同步定时器
*/
public class MaterialinventoryTimed implements Job {
@Autowired
IMaterialinventoryService iMaterialinventoryService;
@Autowired
MaterialinventoryApi materialinventoryApi;
// /**测试定时*/
// // @Scheduled(fixedDelay = 5000)
// public void Materialinventory(){
// List<Materialinventoryerror> list = iMaterialinventoryService.list(new QueryWrapper<Materialinventoryerror>().eq("synchronization", "0"));
// for (int i=0;i<list.size();i++){
// String rs = materialinventoryApi.add((Map) JSON.parse(list.get(i).getJson()));
// JSONObject js = JSONObject.fromObject(rs);
// if( js.get("successful").toString() =="true"){
// iMaterialinventoryService.updateById(list.get(i));
// }
// }
// }
/**设置定时器功能
* */
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void Materialinventory() throws IOException, ParseException {
iMaterialinventoryService.synchronization(null);
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
iMaterialinventoryService.synchronization(null);
}catch (Exception e){
e.printStackTrace();
}
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.service.IPhysicalIDerrorService;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
@Slf4j
@Component
@EnableScheduling
public class PhysicalIDTimed implements Job {
@Autowired
IPhysicalIDerrorService physicalIDService;
/**测试定时*/
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void Materialinventory() throws IOException, ParseException {
physicalIDService.synchronization(null);
System.out.println("执行了");
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
physicalIDService.synchronization(null);
} catch (ParseException e) {
e.printStackTrace();
}
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.entity.Productinventoryerror;
import org.jeecg.modules.iost.API.service.IProductInventoryService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
/**
* 产成品同步的定时器
*/
@Slf4j
@Component
@EnableScheduling
public class ProductInventoryTimed implements Job {
@Autowired
IProductInventoryService productInventoryService;
/**测试定时*/
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void Materialinventory() throws IOException, ParseException {
productInventoryService.synchronization(null);
// System.out.println("执行了");
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
productInventoryService.synchronization(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.iost.API.service.IProductionOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.ParseException;
@Slf4j
@Component
@EnableScheduling
public class ProductionOrderTimed {
@Autowired
IProductionOrderService productionOrderService;
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void job() throws ParseException {
productionOrderService.synchronization(null);
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.iost.API.service.IProductionOrderService;
import org.jeecg.modules.iost.API.service.IProductionSchedulingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.ParseException;
@Slf4j
@Component
@EnableScheduling
public class ProductionSchedulingTimed {
@Autowired
IProductionSchedulingService productionSchedulingService;
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void job() throws ParseException {
productionSchedulingService.synchronization(null);
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.entity.Purchaseorder;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
@Slf4j
@Component
@EnableScheduling
public class PurchaseorderTimed implements Job {
@Autowired
IPurchaseorderService iPurchaseorderService;
/**
* 测试定时
*/
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000 * 60)
public void Materialinventory() throws IOException, ParseException {
iPurchaseorderService.synchronizationList(null);
System.out.println("执行了");
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
iPurchaseorderService.synchronizationList(null);
} catch (IOException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.entity.Reservestockerror;
import org.jeecg.modules.iost.API.service.IReserveStockService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
@Slf4j
@Component
@EnableScheduling
/**
* 备品同步定时器
*/
public class ReserveStockTimed implements Job {
@Autowired
IReserveStockService reserveStockService;
/**
* 测试定时
*/
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000 * 60)
public void Materialinventory() throws IOException, ParseException {
reserveStockService.synchronization(null);
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
reserveStockService.synchronization(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
package org.jeecg.modules.iost.API.TimedTask;
import com.google.api.client.util.Sleeper;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.modules.iost.API.entity.Purchaseorder;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.jeecg.modules.iost.API.service.ISalesOrderService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.aop.ThrowsAdvice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
import java.io.IOException;
@Slf4j
@Component
@EnableScheduling
public class SalesOrderTimed {
@Autowired
ISalesOrderService salesOrderService;
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void job() throws ParseException {
salesOrderService.synchronization(null);
}
}
package org.jeecg.modules.iost.API.TimedTask;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.iost.API.entity.Productinventoryerror;
import org.jeecg.modules.iost.API.entity.Supplylisterror;
import org.jeecg.modules.iost.API.service.ISupplyListIService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.ParseException;
/**
* 供货单定时器
*/
@Slf4j
@Component
@EnableScheduling
public class SupplylistTimed implements Job {
@Autowired
ISupplyListIService supplyListIService;
// @Scheduled(cron = "0 0 1 * * ?")//cron表达式每天凌晨一点
@Scheduled(fixedDelay = 1000*60)
public void Materialinventory() throws IOException, ParseException {
supplyListIService.synchronization(null);
}
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
supplyListIService.synchronization(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
package org.jeecg.modules.iost.API.Util;
import java.io.IOException;
import java.nio.charset.Charset;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.net.ssl.SSLContext;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.config.ConnectionConfig;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.config.SocketConfig;
import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLContexts;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
/**
* <p>类名: HttpUtils</p>
* <p>描述: http请求工具类</p>
* <p>修改时间: 2019年04月30日 上午10:12:35</p>
*
* @author lidongyang
*/
public class HttpUtils {
public static String defaultEncoding = "utf-8";
/**
* 发送http post请求,并返回响应实体
*
* @param url 请求地址
* @return url响应实体
*/
public static String postRequest(String url) {
return postRequest(url, null, null);
}
/**
* <p>方法名: postRequest</p>
* <p>描述: 发送httpPost请求</p>
*
* @param url
* @param params
* @return
*/
public static String postRequest(String url, Map<String, Object> params) {
return postRequest(url, null, params);
}
/**
* 发送http post请求,并返回响应实体
*
* @param url 访问的url
* @param headers 请求需要添加的请求头
* @param params 请求参数
* @return
*/
public static String postRequest(String url, Map<String, String> headers,
Map<String, Object> params) {
String result = null;
CloseableHttpClient httpClient = buildHttpClient();
HttpPost httpPost = new HttpPost(url);
if (null != headers && headers.size() > 0) {
for (Entry<String, String> entry : headers.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
httpPost.addHeader(new BasicHeader(key, value));
}
}
if (null != params && params.size() > 0) {
List<NameValuePair> pairList = new ArrayList<NameValuePair>(params.size());
for (Entry<String, Object> entry : params.entrySet()) {
NameValuePair pair = new BasicNameValuePair(entry.getKey(), entry.getValue().toString());
pairList.add(pair);
}
httpPost.setEntity(new UrlEncodedFormEntity(pairList, Charset.forName(defaultEncoding)));
}
try {
CloseableHttpResponse response = httpClient.execute(httpPost);
try {
HttpEntity entity = response.getEntity();
if (entity != null) {
result = EntityUtils.toString(entity,
Charset.forName(defaultEncoding));
}
} finally {
response.close();
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return result;
}
/**
* 发送http get请求
*
* @param url 请求url
* @return url返回内容
*/
public static String getRequest(String url) {
return getRequest(url, null);
}
/**
* 发送http get请求
*
* @param url 请求的url
* @param params 请求的参数
* @return
*/
public static String getRequest(String url, Map<String, Object> params) {
return getRequest(url, null, params);
}
/**
* 发送http get请求
*
* @param url 请求的url
* @param headersMap 请求头
* @param params 请求的参数
* @return
*/
public static String getRequest(String url, Map<String, String> headersMap, Map<String, Object> params) {
String result = null;
CloseableHttpClient httpClient = buildHttpClient();
try {
String apiUrl = url;
if (null != params && params.size() > 0) {
StringBuffer param = new StringBuffer();
int i = 0;
for (String key : params.keySet()) {
if (i == 0)
param.append("?");
else
param.append("&");
param.append(key).append("=").append(params.get(key));
i++;
}
apiUrl += param;
}
HttpGet httpGet = new HttpGet(apiUrl);
if (null != headersMap && headersMap.size() > 0) {
for (Entry<String, String> entry : headersMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
httpGet.addHeader(new BasicHeader(key, value));
}
}
CloseableHttpResponse response = httpClient.execute(httpGet);
try {
HttpEntity entity = response.getEntity();
if (null != entity) {
result = EntityUtils.toString(entity, defaultEncoding);
}
} finally {
response.close();
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return result;
}
/**
* 创建httpclient
*
* @return
*/
public static CloseableHttpClient buildHttpClient() {
try {
RegistryBuilder<ConnectionSocketFactory> builder = RegistryBuilder
.create();
ConnectionSocketFactory factory = new PlainConnectionSocketFactory();
builder.register("http", factory);
KeyStore trustStore = KeyStore.getInstance(KeyStore
.getDefaultType());
SSLContext context = SSLContexts.custom().useTLS()
.loadTrustMaterial(trustStore, new TrustStrategy() {
public boolean isTrusted(X509Certificate[] chain,
String authType) throws CertificateException {
return true;
}
}).build();
LayeredConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory(
context,
SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
builder.register("https", sslFactory);
Registry<ConnectionSocketFactory> registry = builder.build();
PoolingHttpClientConnectionManager manager = new PoolingHttpClientConnectionManager(
registry);
ConnectionConfig connConfig = ConnectionConfig.custom()
.setCharset(Charset.forName(defaultEncoding)).build();
SocketConfig socketConfig = SocketConfig.custom()
.setSoTimeout(100000).build();
manager.setDefaultConnectionConfig(connConfig);
manager.setDefaultSocketConfig(socketConfig);
return HttpClientBuilder.create().setConnectionManager(manager)
.build();
} catch (KeyStoreException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return null;
}
}
\ No newline at end of file
package org.jeecg.modules.iost.API.Util;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 把不同的数据类型转化成json类型字符串
*/
public class JsonUtil {
public static String Objectjson(Object obj) {
StringBuilder json = new StringBuilder();
if (obj == null) {
json.append("\"\"");
} else if (obj instanceof String || obj instanceof Integer || obj instanceof Float
|| obj instanceof Boolean || obj instanceof Short || obj instanceof Double
|| obj instanceof Long || obj instanceof BigDecimal || obj instanceof BigInteger
|| obj instanceof Byte) {
json.append("\"").append(Stringjson(obj.toString())).append("\"");
} else if (obj instanceof Object[]) {
json.append(array2json((Object[]) obj));
} else if (obj instanceof List) {
json.append(Listjson((List<?>) obj));
} else if (obj instanceof Map) {
json.append(Mapjson((Map<?, ?>) obj));
} else if (obj instanceof Set) {
json.append(Setjson((Set<?>) obj));
} else {
json.append(bean2json(obj));
}
return json.toString();
}
public static String Stringjson(String s) {
if (s == null)
return "";
StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
switch (ch) {
case '"':
sb.append("\\\"");
break;
case '\\':
sb.append("\\\\");
break;
case '\b':
sb.append("\\b");
break;
case '\f':
sb.append("\\f");
break;
case '\n':
sb.append("\\n");
break;
case '\r':
sb.append("\\r");
break;
case '\t':
sb.append("\\t");
break;
case '/':
sb.append("\\/");
break;
default:
if (ch >= '\u0000' && ch <= '\u001F') {
String ss = Integer.toHexString(ch);
sb.append("\\u");
for (int k = 0; k < 4 - ss.length(); k++) {
sb.append('0');
}
sb.append(ss.toUpperCase());
} else {
sb.append(ch);
}
}
}
return sb.toString();
}
public static String array2json(Object[] array) {
StringBuilder json = new StringBuilder();
json.append("[");
if (array != null && array.length > 0) {
for (Object obj : array) {
json.append(Objectjson(obj));
json.append(",");
}
json.setCharAt(json.length() - 1, ']');
} else {
json.append("]");
}
return json.toString();
}
public static String Listjson(List<?> list) {
StringBuilder json = new StringBuilder();
json.append("[");
if (list != null && list.size() > 0) {
for (Object obj : list) {
json.append(Objectjson(obj));
json.append(",");
}
json.setCharAt(json.length() - 1, ']');
} else {
json.append("]");
}
return json.toString();
}
public static String Mapjson(Map<?, ?> map) {
StringBuilder json = new StringBuilder();
json.append("{");
if (map != null && map.size() > 0) {
for (Object key : map.keySet()) {
json.append(Objectjson(key));
json.append(":");
json.append(Objectjson(map.get(key)));
json.append(",");
}
json.setCharAt(json.length() - 1, '}');
} else {
json.append("}");
}
return json.toString();
}
public static String Setjson(Set<?> set) {
StringBuilder json = new StringBuilder();
json.append("[");
if (set != null && set.size() > 0) {
for (Object obj : set) {
json.append(Objectjson(obj));
json.append(",");
}
json.setCharAt(json.length() - 1, ']');
} else {
json.append("]");
}
return json.toString();
}
public static String bean2json(Object bean) {
StringBuilder json = new StringBuilder();
json.append("{");
PropertyDescriptor[] props = null;
try {
props = Introspector.getBeanInfo(bean.getClass(), Object.class).getPropertyDescriptors();
} catch (IntrospectionException e) {}
if (props != null) {
for (int i = 0; i < props.length; i++) {
try {
String name = Objectjson(props[i].getName());
String value = Objectjson(props[i].getReadMethod().invoke(bean));
json.append(name);
json.append(":");
json.append(value);
json.append(",");
} catch (Exception e) {}
}
json.setCharAt(json.length() - 1, '}');
} else {
json.append("}");
}
return json.toString();
}
}
\ No newline at end of file
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.GridError;
import org.jeecg.modules.iost.API.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags = "请求国网日志")
@RestController
@RequestMapping("/API/griderror")
@Slf4j
public class GridErrorController {
@Autowired
GridErrorService gridErrorService;
@Autowired
private ISupplyListIService supplyListIService;
@Autowired
private ISalesOrderService salesOrderService;
@Autowired
private IProductionOrderService productionOrderService;
@Autowired
private IProductionSchedulingService productionSchedulingService;
@Autowired
private IMaterialinventoryService iMaterialinventoryService;
@Autowired
private IPhysicalIDerrorService physicalIDerrorService;
@Autowired
private IProductInventoryService productInventoryService;
@Autowired
private IReserveStockService reserveStockService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网日志接口-分页列表查询")
@ApiOperation(value = "国网日志接口-分页列表查询", notes = "国网日志接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(GridError gridError,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<GridError> queryWrapper = QueryGenerator.initQueryWrapper(gridError, req.getParameterMap());
Page<GridError> page = new Page<GridError>(pageNo, pageSize);
IPage<GridError> pageList = gridErrorService.page(page, queryWrapper);
return Result.OK(pageList);
}
@PostMapping(value = "manual")
public Result<?> synchronization(@RequestBody GridError data) throws ParseException {
Boolean success = false;
String id=data.getId();
Result ok = new Result();
JSONObject jsonObject = JSONObject.fromObject(data.getRequestjson());
Map map = com.alibaba.fastjson.JSONObject.parseObject(String.valueOf(jsonObject), Map.class);
if (data.getBusinessNo() != null) {
switch (data.getBusinessNo()) {
case 2:
success = supplyListIService.grid(map);
ok = Result.OK(success);
break;
case 3:
success = salesOrderService.grid(map);
ok = Result.OK(success);
break;
case 4:
success = productionOrderService.grid(map);
ok = Result.OK(success);
break;
case 5:
success = productionSchedulingService.grid(map);
ok = Result.OK(success);
break;
case 6:
success = iMaterialinventoryService.grid(map);
ok = Result.OK(success);
break;
case 7:
success = physicalIDerrorService.grid(map);
ok = Result.OK(success);
break;
case 8:
success = productInventoryService.grid(map);
ok = Result.OK(success);
break;
case 9:
success = reserveStockService.grid(map);
ok = Result.OK(success);
break;
}
}
editSuccess(success, id);
return ok;
}
public Boolean editSuccess(Boolean success, String id) {
boolean isSuccess = false;
if (success) {
isSuccess = gridErrorService.updateById(new GridError().setId(id).setSuccessagain(1).setSynchronization(1));
} else {
isSuccess = gridErrorService.updateById(new GridError().setId(id).setSuccessagain(0));
}
return isSuccess;
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.GridError;
import org.jeecg.modules.iost.API.entity.GridErrorReturnProcess;
import org.jeecg.modules.iost.API.service.GridErrorReturnProcessService;
import org.jeecg.modules.iost.API.service.GridErrorService;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
@Api(tags = "请求国网日志-正序")
@RestController
@RequestMapping("/API/gereturnprocess")
@Slf4j
public class GridErrorReturnProcessController {
@Autowired
private GridErrorReturnProcessService gridErrorService;
@Autowired
private IPurchaseorderService purchaseorderService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网日志接口-正序-分页列表查询")
@ApiOperation(value = "国网日志接口-正序-分页列表查询", notes = "国网日志接口-正序-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(GridErrorReturnProcess gridError,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<GridErrorReturnProcess> queryWrapper = QueryGenerator.initQueryWrapper(gridError, req.getParameterMap());
Page<GridErrorReturnProcess> page = new Page<GridErrorReturnProcess>(pageNo, pageSize);
IPage<GridErrorReturnProcess> pageList = gridErrorService.page(page, queryWrapper);
return Result.OK(pageList);
}
@PostMapping(value = "manual")
public Result<?> synchronization(@RequestBody GridErrorReturnProcess data) throws ParseException, IOException {
Boolean success = false;
String id=data.getId();
Result ok = new Result();
JSONObject jsonObject = JSONObject.fromObject(data.getRequestjson());
Map map = com.alibaba.fastjson.JSONObject.parseObject(String.valueOf(jsonObject), Map.class);
if (data.getBusinessNo() != null) {
switch (data.getBusinessNo()) {
case 1:
success = purchaseorderService.synchronizationList(map);
ok = Result.OK(success);
break;
}
}
editSuccess(success, id);
return ok;
}
public Boolean editSuccess(Boolean success, String id) {
boolean isSuccess = false;
if (success) {
isSuccess = gridErrorService.updateById(new GridErrorReturnProcess().setId(id).setSuccessagain(1).setSynchronization(1));
} else {
isSuccess = gridErrorService.updateById(new GridErrorReturnProcess().setId(id).setSuccessagain(0));
}
return isSuccess;
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Materialinventoryerror;
import org.jeecg.modules.iost.API.entity.pojo.Materialinventory;
import org.jeecg.modules.iost.API.service.IMaterialinventoryService;
import org.jeecg.modules.iost.API.webapi.MaterialinventoryWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @Description: 国网供应商重点原材料库存API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Api(tags="国网供应商重点原材料库存API")
@RestController
@RequestMapping("/API/eipmatinventory")
@Slf4j
public class MaterialinventoryController {
@Autowired
IMaterialinventoryService iMaterialinventoryService;
@Autowired
MaterialinventoryWebapi materialinventoryWebapi;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网供应商重点原材料库存API-日志分页列表查询")
@ApiOperation(value = "国网供应商重点原材料库存API-日志分页列表查询", notes = "国网供应商重点原材料库存API-日志分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Materialinventoryerror materialinventoryerror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Materialinventoryerror> queryWrapper = QueryGenerator.initQueryWrapper(materialinventoryerror, req.getParameterMap());
Page<Materialinventoryerror> page = new Page<Materialinventoryerror>(pageNo, pageSize);
IPage<Materialinventoryerror> pageList = iMaterialinventoryService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param map
* @return
*/
@AutoLog(value = "国网供应商重点原材料库存API-添加")
@ApiOperation(value="国网供应商重点原材料库存API-添加", notes="国网供应商重点原材料库存API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Map<String,String> map) {
return Result.OK();
}
/**
* 供应商重点原材料库存-查询
* @param map
* @return
*/
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(iMaterialinventoryService.select(map));
}
/**
* 供应商重点原材料库存web-查询
* @param map
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectwebapi(@RequestBody Map<String,String> map){
List<Map<String, String>> list = materialinventoryWebapi.select(map,null);
return Result.OK(list);
}
@AutoLog(value = "国网供应商重点原材料库存API-同步")
@ApiOperation(value="国网供应商重点原材料库存API-同步", notes="国网供应商重点原材料库存API-同步")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
return Result.OK(iMaterialinventoryService.synchronization(null));
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Physicalid;
import org.jeecg.modules.iost.API.entity.Physicaliderror;
import org.jeecg.modules.iost.API.service.IPhysicalIDerrorService;
import org.jeecg.modules.iost.API.webapi.PhysicalIDWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* 实物ID信息国网日志
*/
@Api(tags="实物ID信息国网日志")
@RestController
@RequestMapping("/API/physicaliderror-journal")
@Slf4j
public class PhysicalIDerrorController {
@Autowired
IPhysicalIDerrorService physicalIDService;
@Autowired
PhysicalIDWebapi physicalIDWebapi;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "实物ID信息明细-分页列表查询")
@ApiOperation(value = "实物ID信息明细-分页列表查询", notes = "实物ID信息明细-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Physicaliderror physicaliderror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Physicaliderror> queryWrapper = QueryGenerator.initQueryWrapper(physicaliderror, req.getParameterMap());
Page<Physicaliderror> page = new Page<Physicaliderror>(pageNo, pageSize);
IPage<Physicaliderror> pageList = physicalIDService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value="国网产成品库存信息API-添加", notes="国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/**
* 销售订单-查询
* @param
* @return
*/
@GetMapping(value = "/select")
public Result<?> select() throws ParseException {
return Result.OK(physicalIDService.selectInList(null));
}
/**
* 生产订单web-查询
* @param map
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectwebapi(@RequestBody Map<String,String> map) throws ParseException {
List<Map<String, String>>list = physicalIDWebapi.select(map,null);
return Result.OK(list);
}
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
return Result.OK(physicalIDService.synchronization(null));
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Productinventoryerror;
import org.jeecg.modules.iost.API.entity.pojo.Productinventory;
import org.jeecg.modules.iost.API.service.IProductInventoryService;
import org.jeecg.modules.iost.API.webapi.ProductInventoryWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* 产成品库存信息
*/
@Api(tags="产成品库存信息")
@RestController
@RequestMapping("/API/eip-prod-store")
@Slf4j
public class ProductInventoryController {
@Autowired
IProductInventoryService productInventoryService;
@Autowired
ProductInventoryWebapi productInventoryWebapi;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网产成品库存信息API-日志分页列表查询")
@ApiOperation(value = "国网产成品库存信息API-日志分页列表查询", notes = "国网产成品库存信息API-日志分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Productinventoryerror productinventoryerror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Productinventoryerror> queryWrapper = QueryGenerator.initQueryWrapper(productinventoryerror, req.getParameterMap());
Page<Productinventoryerror> page = new Page<Productinventoryerror>(pageNo, pageSize);
IPage<Productinventoryerror> pageList = productInventoryService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value="国网产成品库存信息API-添加", notes="国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/**
* 产成品库存-查询
* @param map
* @return
*/
@AutoLog(value = "国网产成品库存信息API-查询所有库存信息")
@ApiOperation(value="国网产成品库存信息API-查询所有库存信息", notes="国网产成品库存信息API-查询所有库存信息")
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(productInventoryService.select(map));
}
/**
* 产成品库存-查询
* @param map
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectwebapi(@RequestBody Map<String,String> map){
List<Map<String, String>>list = productInventoryWebapi.select(map,null);
return Result.OK(list);
}
/**
* 从金蝶云即时库存中同步今天的产成品
* @return
*/
@AutoLog(value = "国网产成品库存信息API-同步今天的产成品")
@ApiOperation(value="国网产成品库存信息API-同步今天的产成品", notes="国网产成品库存信息API-同步今天的产成品")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
return Result.OK(productInventoryService.synchronization(null));
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Productionordererror;
import org.jeecg.modules.iost.API.service.IProductionOrderService;
import org.jeecg.modules.iost.API.webapi.PhysicalIDWebapi;
import org.jeecg.modules.iost.API.webapi.ProductionOrderWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @Description: 国网生产订单API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Api(tags="生产订单")
@RestController
@RequestMapping("/API/supplier-ipo")
@Slf4j
public class ProductionOrderController {
@Autowired
IProductionOrderService productionOrderService;
@Autowired
ProductionOrderWebapi productionOrderWebapi;
@AutoLog(value = "生产订单API-新增")
@ApiOperation(value="生产订单API-新增", notes="生产订单API-同步至国网")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Map<String,String> map){
JSONObject add = productionOrderService.add(map);
return Result.OK(add);
}
/* *//**
* 生产订单-查询
* @param
* @return
*//*
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(productionOrderService.select(map));
}*/
@AutoLog(value = "国网生产订单日志-生产订单接口-分页列表查询")
@ApiOperation(value = "国网生产订单日志-生产订单接口-分页列表查询", notes = "国网生产订单日志-生产订单接口-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Productionordererror productionordererror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Productionordererror> queryWrapper = QueryGenerator.initQueryWrapper(productionordererror, req.getParameterMap());
Page<Productionordererror> page = new Page<Productionordererror>(pageNo, pageSize);
IPage<Productionordererror> pageList = productionOrderService.page(page, queryWrapper);
System.out.println(pageList);
return Result.OK(pageList);
}
/**
* 生产订单web-查询
* @param
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectwebapi(){
List<Map<String, String>>list = productionOrderWebapi.select(null,null);
return Result.OK();
}
@AutoLog(value = "生产订单API-同步至国网")
@ApiOperation(value="生产订单API-同步至国网", notes="生产订单API-同步至国网")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
productionOrderService.synchronization(null);
return Result.OK("同步成功");
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.ExternalInterface.PurchaseorderApi;
import org.jeecg.modules.iost.API.entity.Productionschedulingerror;
import org.jeecg.modules.iost.API.service.IProductionSchedulingService;
import org.jeecg.modules.iost.API.webapi.ProductionSchedulingWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 排产计划
*/
@Api(tags="排产计划")
@RestController
@RequestMapping("/API/supplier-production-schedule")
@Slf4j
public class ProductionSchedulingController {
@Autowired
IProductionSchedulingService productionSchedulingService;
@Autowired
ProductionSchedulingWebapi productionSchedulingWebapi;
@Autowired
PurchaseorderApi purchaseorderApi;
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value="国网产成品库存信息API-添加", notes="国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/** -
* 排产计划-查询webapi
* @param
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectweb(){
List<Map<String, String>> list = productionSchedulingWebapi.select(null, null);
return Result.OK(list);
}
@AutoLog(value = "排产计划API-同步至国网")
@ApiOperation(value="排产计划API-同步至国网", notes="排产计划API-同步至国网")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
productionSchedulingService.synchronization(null);
return Result.OK("同步成功");
}
@AutoLog(value = "国网排产计划日志-排产计划接口-分页列表查询")
@ApiOperation(value = "国网排产计划日志-排产计划接口-分页列表查询", notes = "国网排产计划日志-排产计划接口-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Productionschedulingerror productionordererror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Productionschedulingerror> queryWrapper = QueryGenerator.initQueryWrapper(productionordererror, req.getParameterMap());
Page<Productionschedulingerror> page = new Page<Productionschedulingerror>(pageNo, pageSize);
IPage<Productionschedulingerror> pageList = productionSchedulingService.page(page, queryWrapper);
System.out.println(pageList);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.apache.commons.lang.StringEscapeUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Purchaseorder;
import org.jeecg.modules.iost.API.entity.Purchaseordererror;
import org.jeecg.modules.iost.API.lanjieqi.Lanjieqi_API;
import org.jeecg.modules.iost.API.service.PurchaseordererrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* 实物ID信息
*/
@Api(tags="同步金蝶国网返回日志")
@RestController
@RequestMapping("/API/purchase-order-journal")
@Slf4j
public class PurchaseordererrorController {
@Autowired
private PurchaseordererrorService purchaseordererrorService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "金蝶销售订单接口-分页列表查询")
@ApiOperation(value = "金蝶销售订单接口-分页列表查询", notes = "金蝶销售订单接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Purchaseordererror purchaseordererror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Purchaseordererror> purchaseordererrorQueryWrapper = QueryGenerator.initQueryWrapper(purchaseordererror, req.getParameterMap());
Page<Purchaseordererror> purchaseorderPage = new Page<>(pageNo, pageSize);
IPage<Purchaseordererror> page = purchaseordererrorService.page(purchaseorderPage, purchaseordererrorQueryWrapper);
return Result.OK(page);
}
@GetMapping(value = "select")
public Result<?> select() {
Map<String, Object> id = purchaseordererrorService.getMap(new QueryWrapper<Purchaseordererror>().eq("id", "1426426456518492162"));
return Result.OK(id);
}
}
package org.jeecg.modules.iost.API.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.iost.API.service.IReportWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @Description: 报工信息
*/
@Api(tags="报工信息")
@RestController
@RequestMapping("/API/supplier-process-work")
@Slf4j
public class ReportWorkController {
@Autowired
IReportWorkService reportWorkService;
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value="国网产成品库存信息API-添加", notes="国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/**
* 销售订单-查询
* @param map
* @return
*/
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(reportWorkService.select(map));
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Reservestockerror;
import org.jeecg.modules.iost.API.entity.pojo.Reservestock;
import org.jeecg.modules.iost.API.service.IReserveStockService;
import org.jeecg.modules.iost.API.webapi.ReserveStockWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @Description: 备品备件库存
*/
@Api(tags = "备品备件库存")
@RestController
@RequestMapping("/API/eip_spare_product")
@Slf4j
public class ReserveStockController {
@Autowired
IReserveStockService reserveStockService;
@Autowired
ReserveStockWebapi reserveStockWebapi;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网产成品库存信息API-日志分页列表查询")
@ApiOperation(value = "国网产成品库存信息API-日志分页列表查询", notes = "国网产成品库存信息API-日志分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Reservestockerror reservestockerror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Reservestockerror> queryWrapper = QueryGenerator.initQueryWrapper(reservestockerror, req.getParameterMap());
Page<Reservestockerror> page = new Page<Reservestockerror>(pageNo, pageSize);
IPage<Reservestockerror> pageList = reserveStockService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value = "国网产成品库存信息API-添加", notes = "国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/**
* 备品备件库存-查询
*
* @param map
* @return
*/
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String, String> map) {
return Result.OK(reserveStockService.select(map));
}
/**
* 备品备件库存web-查询
*
* @param map
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectwebapi(@RequestBody Map<String, String> map) {
List<Map<String, String>> list = reserveStockWebapi.select(map, null);
return Result.OK(list);
}
/**
* 从金蝶生产入库单获取备品添加到国网
*
* @return
*/
@AutoLog(value = "国网备品库存信息API-同步")
@ApiOperation(value = "国网备品库存信息API-同步", notes = "国网备品库存信息API-同步")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
return Result.OK(reserveStockService.synchronization(null));
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.ExternalInterface.PurchaseorderApi;
import org.jeecg.modules.iost.API.entity.Purchaseorder;
import org.jeecg.modules.iost.API.entity.Salesordererror;
import org.jeecg.modules.iost.API.service.ISalesOrderService;
import org.jeecg.modules.iost.API.webapi.SalesOrderWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags="销售订单")
@RestController
@RequestMapping("/API/supplier-so")
@Slf4j
public class SalesOrderController {
@Autowired
ISalesOrderService salesOrderService;
@Autowired
SalesOrderWebapi salesOrderWebapi;
@Autowired
PurchaseorderApi purchaseorderApi;
@AutoLog(value = "销售API-新增")
@ApiOperation(value="销售API-新增", notes="销售API-同步至国网")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Map<String,String> map){
System.out.println(map);
JSONObject add = salesOrderService.add(map);
return Result.OK(add);
}
/*销售订单-查询webapi*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectweb()
{
List<Map<String, String>> list = salesOrderWebapi.select(null, null);
return Result.OK(list);
}
@AutoLog(value = "销售API-同步至国网")
@ApiOperation(value="销售API-同步至国网", notes="销售API-同步至国网")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
salesOrderService.synchronization(null);
/*return Result.OK( salesOrderService.synchronization(null));*/
return Result.OK("同步成功");
}
@AutoLog(value = "国网销售订单日志-销售订单接口-分页列表查询")
@ApiOperation(value = "国网销售订单日志-销售订单接口-分页列表查询", notes = "国网销售订单日志-销售订单接口-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Salesordererror productionordererror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Salesordererror> queryWrapper = QueryGenerator.initQueryWrapper(productionordererror, req.getParameterMap());
Page<Salesordererror> page = new Page<Salesordererror>(pageNo, pageSize);
IPage<Salesordererror> pageList = salesOrderService.page(page, queryWrapper);
System.out.println(pageList);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Supplylisterror;
import org.jeecg.modules.iost.API.entity.pojo.Supplylist;
import org.jeecg.modules.iost.API.service.ISupplyListIService;
import org.jeecg.modules.iost.API.webapi.SupplyListWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @Description: 供货单信息
*/
@Api(tags="供货单信息")
@RestController
@RequestMapping("/API/supply-add")
@Slf4j
public class SupplyListController {
@Autowired
ISupplyListIService supplyListIService;
@Autowired
SupplyListWebapi supplyListWebapi;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网供货单信息API-日志分页列表查询")
@ApiOperation(value = "国网供货单信息API-日志分页列表查询", notes = "国网供货单信息API-日志分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Supplylisterror supplylisterror,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Supplylisterror> queryWrapper = QueryGenerator.initQueryWrapper(supplylisterror, req.getParameterMap());
Page<Supplylisterror> page = new Page<Supplylisterror>(pageNo, pageSize);
IPage<Supplylisterror> pageList = supplyListIService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value="国网产成品库存信息API-添加", notes="国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/**
* 供货单-查询
* @param map
* @return
*/
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(supplyListIService.select(map));
}
/**
* 供货单web-查询
* @param map
* @return
*/
@GetMapping(value = "/selectwebapi")
public Result<?> selectwebapi(@RequestBody Map<String,String> map) throws ParseException {
List<Map<String, String>>list = supplyListWebapi.select(map,null);
return Result.OK(list);
}
/**
* 同步今天金蝶云新增的销售出货单到国网
* @return
*/
@AutoLog(value = "国网供货单信息API-同步")
@ApiOperation(value="国网供货单信息API-同步", notes="国网供货单信息API-同步")
@PostMapping(value = "/synchronization")
public Result<?> synchronization() throws ParseException {
return Result.OK(supplyListIService.synchronization(null));
}
}
package org.jeecg.modules.iost.API.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.iost.API.service.IWorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @Description: 工单信息
*/
@Api(tags="工单信息")
@RestController
@RequestMapping("/API/Eipsupplier-wo")
@Slf4j
public class WorkOrderController {
@Autowired
IWorkOrderService workOrderService;
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "国网产成品库存信息API-添加")
@ApiOperation(value="国网产成品库存信息API-添加", notes="国网产成品库存信息API-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK("添加成功!");
}
/**
* 销售订单-查询
* @param map
* @return
*/
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(workOrderService.select(map));
}
}
package org.jeecg.modules.iost.API.controller.kingdeejournal;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.kingdeejournal.KingdeeJournal;
import org.jeecg.modules.iost.API.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.HashMap;
@Api(tags = "请求金蝶日志")
@RestController
@RequestMapping("/API/kingdeejournal")
@Slf4j
public class KingdeeJournalController {
@Autowired
private KingdeeJournalService kingdeeJournalService;
@Autowired
private ISupplyListIService supplyListIService;
@Autowired
private ISalesOrderService salesOrderService;
@Autowired
private IProductionOrderService productionOrderService;
@Autowired
private IProductionSchedulingService productionSchedulingService;
@Autowired
private IMaterialinventoryService iMaterialinventoryService;
@Autowired
private IPhysicalIDerrorService physicalIDerrorService;
@Autowired
private IReserveStockService reserveStockService;
@Autowired
private IProductInventoryService productInventoryService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "金蝶日志接口-分页列表查询")
@ApiOperation(value = "金蝶日志接口-分页列表查询", notes = "金蝶日志接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(KingdeeJournal kingdeeJournal,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KingdeeJournal> queryWrapper = QueryGenerator.initQueryWrapper(kingdeeJournal, req.getParameterMap());
Page<KingdeeJournal> page = new Page<KingdeeJournal>(pageNo, pageSize);
IPage<KingdeeJournal> pageList = kingdeeJournalService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*/
@PostMapping(value = "manual")
public Result<?> synchronization(@RequestBody HashMap<String, String> data) throws ParseException {
Boolean success = false;
Result ok = new Result();
JSONObject jsonObject = null;
String king;
String id = null;
Integer businessNo = null;
String request = null;
id = data.get("id");
businessNo = Integer.parseInt(data.get("businessNo"));
request = data.get("request");
king = request;
Object filterString = null;
if (businessNo != null) {
if (businessNo!=1){
filterString = JSONObject.fromObject(request).get("FilterString");
}
switch (businessNo) {
case 1:
String synchronization1 = kingdeeJournalService.synchronizationAdd(businessNo, king);
jsonObject = JSONObject.fromObject(synchronization1);
JSONObject result = JSONObject.fromObject(jsonObject.get("Result"));
Object o = JSONObject.fromObject(result.get("ResponseStatus")).get("IsSuccess");
success= (Boolean) o;
ok = Result.OK(jsonObject);
break;
case 2:
success = supplyListIService.synchronization(filterString);
ok = Result.OK(success);
break;
case 3:
success = salesOrderService.synchronization(filterString);
ok = Result.OK(success);
break;
case 4:
success = productionOrderService.synchronization(filterString);
ok = Result.OK(success);
break;
case 5:
success = productionSchedulingService.synchronization(filterString);
ok = Result.OK(success);
break;
case 6:
success = iMaterialinventoryService.synchronization(filterString);
ok = Result.OK(success);
break;
case 7:
success = physicalIDerrorService.synchronization(filterString);
ok = Result.OK(success);
break;
case 8:
success = productInventoryService.synchronization(filterString);
ok = Result.OK(success);
break;
case 9:
success = reserveStockService.synchronization(filterString);
ok = Result.OK(success);
break;
}
}
editSuccess(success, id);
return ok;
}
public Boolean editSuccess(Boolean success, String id) {
boolean isSuccess = false;
if (success) {
isSuccess = kingdeeJournalService.updateById(new KingdeeJournal().setId(id).setSuccessagain(1).setSynchronization(1));
} else {
isSuccess = kingdeeJournalService.updateById(new KingdeeJournal().setId(id).setSuccessagain(0));
}
return isSuccess;
}
}
package org.jeecg.modules.iost.API.controller.kingdeejournal;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.kingdeejournal.KingdeeJournalReturnProcess;
import org.jeecg.modules.iost.API.entity.kingdeejournal.KingdeeJournalReturnProcess;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.jeecg.modules.iost.API.service.KingdeeJournalReturnProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Api(tags = "金蝶日志-正序 ")
@RestController
@RequestMapping("/API/kingdeejournalrp")
@Slf4j
public class KingdeeJournalReturnProcessController {
@Autowired
private KingdeeJournalReturnProcessService kingdeeJournalReturnProcessService;
@Autowired
private IPurchaseorderService purchaseorderService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "金蝶日志-正序-分页列表查询")
@ApiOperation(value = "金蝶日志-正序-分页列表查询", notes = "金蝶日志-正序-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(KingdeeJournalReturnProcess kingdeeJournal,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KingdeeJournalReturnProcess> queryWrapper = QueryGenerator.initQueryWrapper(kingdeeJournal, req.getParameterMap());
Page<KingdeeJournalReturnProcess> page = new Page<KingdeeJournalReturnProcess>(pageNo, pageSize);
IPage<KingdeeJournalReturnProcess> pageList = kingdeeJournalReturnProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*/
@PostMapping(value = "manual")
public Result<?> synchronization(@RequestBody KingdeeJournalReturnProcess data) throws ParseException {
Boolean success = false;
Result ok = new Result();
String ReturnProcessId = data.getReturnProcessId();
Integer businessNo = null;
String id = data.getId();
businessNo = data.getBusinessNo();
Map<String, Object> jsonObject1 = JSONObject.fromObject(data.getReturnProcessJson());
if (businessNo != null) {
switch (businessNo) {
case 1:
success = purchaseorderService.manual(jsonObject1, ReturnProcessId);
ok = Result.OK(success);
break;
}
}
editSuccess(success, id);
return ok;
}
public Boolean editSuccess(Boolean success, String id) {
boolean isSuccess = false;
if (success) {
isSuccess = kingdeeJournalReturnProcessService.updateById(new KingdeeJournalReturnProcess().setId(id).setSuccessagain(1).setSynchronization(1));
} else {
isSuccess = kingdeeJournalReturnProcessService.updateById(new KingdeeJournalReturnProcess().setId(id).setSuccessagain(0));
}
return isSuccess;
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.Materialinventory;
import org.jeecg.modules.iost.API.service.pojo.MaterialinventoryPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="存放国网重点材料数据信息")
@RestController
@RequestMapping("/API/materialinventoryPojo")
@Slf4j
public class MaterialinventoryPojoController {
@Autowired
MaterialinventoryPojoService materialinventoryPojoService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网重点材料数据信息接口-分页列表查询")
@ApiOperation(value = "国网重点材料数据信息接口-分页列表查询", notes = "国网重点材料数据信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Materialinventory materialinventory,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Materialinventory> queryWrapper = QueryGenerator.initQueryWrapper(materialinventory, req.getParameterMap());
Page<Materialinventory> page = new Page<Materialinventory>(pageNo, pageSize);
IPage<Materialinventory> pageList = materialinventoryPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.Physicalid;
import org.jeecg.modules.iost.API.entity.Purchaseorder;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.jeecg.modules.iost.API.service.PhysicalidService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="实物ID明细接口")
@RestController
@RequestMapping("/API/supplier-send-physicalid")
@Slf4j
public class PhysicalidController {
@Autowired
PhysicalidService physicalidService;
@Autowired
IPurchaseorderService purchaseorderService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "实物ID信息明细-分页列表查询")
@ApiOperation(value = "实物ID信息明细-分页列表查询", notes = "实物ID信息明细-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Physicalid physicalid,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Physicalid> queryWrapper = QueryGenerator.initQueryWrapper(physicalid, req.getParameterMap());
Page<Physicalid> page = new Page<Physicalid>(pageNo, pageSize);
IPage<Physicalid> pageList = physicalidService.page(page, queryWrapper);
return Result.OK(pageList);
}
@GetMapping(value = "test")
Result test(){
QueryWrapper<Purchaseorder> queryWrapper = new QueryWrapper<>();
queryWrapper.select("F_Id");
queryWrapper.eq("F_Id", "10052");
//查询是否为集成平台生成的订单,并过滤
Purchaseorder purchaseorders1 = purchaseorderService.getBaseMapper().selectOne(queryWrapper);
boolean b = purchaseorders1 == null;
System.out.println("purchaseorders1"+b);
return Result.OK(purchaseorders1);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.Materialinventory;
import org.jeecg.modules.iost.API.entity.pojo.Productinventory;
import org.jeecg.modules.iost.API.service.pojo.ProductinventoryPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="存放国网产成品数据信息")
@RestController
@RequestMapping("/API/productInventoryPojo")
@Slf4j
public class ProductInventoryPojoController {
@Autowired
ProductinventoryPojoService productinventoryPojoService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网产成品数据信息接口-分页列表查询")
@ApiOperation(value = "国网产成品数据信息接口-分页列表查询", notes = "国网产成品数据信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Productinventory productinventory,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Productinventory> queryWrapper = QueryGenerator.initQueryWrapper(productinventory, req.getParameterMap());
Page<Productinventory> page = new Page<Productinventory>(pageNo, pageSize);
IPage<Productinventory> pageList = productinventoryPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.ProductionOrder;
import org.jeecg.modules.iost.API.service.pojo.ProductionOrderPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="生产订单明细信息")
@RestController
@RequestMapping("/API/ProductionOrderPojolist")
@Slf4j
public class ProductionOrderPojoController {
@Autowired
ProductionOrderPojoService productionOrderPojoService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "生产订单明细信息接口-分页列表查询")
@ApiOperation(value = "生产订单明细信息接口-分页列表查询", notes = "生产订单明细信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(ProductionOrder productinventory,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ProductionOrder> queryWrapper = QueryGenerator.initQueryWrapper(productinventory, req.getParameterMap());
Page<ProductionOrder> page = new Page<ProductionOrder>(pageNo, pageSize);
IPage<ProductionOrder> pageList = productionOrderPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.Productionscheduling;
import org.jeecg.modules.iost.API.service.pojo.ProductionschedulingPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="排产计划明细信息")
@RestController
@RequestMapping("/API/ProductionschedulingPojolist")
@Slf4j
public class ProductionSchedulingPojoController {
@Autowired
ProductionschedulingPojoService productionschedulingPojoService;
@AutoLog(value = "排产计划明细信息接口-分页列表查询")
@ApiOperation(value = "排产计划明细信息接口-分页列表查询", notes = "排产计划明细信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Productionscheduling productinventory,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Productionscheduling> queryWrapper = QueryGenerator.initQueryWrapper(productinventory, req.getParameterMap());
Page<Productionscheduling> page = new Page<Productionscheduling>(pageNo, pageSize);
IPage<Productionscheduling> pageList = productionschedulingPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.ExternalInterface.PurchaseorderApi;
import org.jeecg.modules.iost.API.dto.PurchaseordeRequest;
import org.jeecg.modules.iost.API.dto.RequestAnalysis;
import org.jeecg.modules.iost.API.entity.Purchaseorder;
import org.jeecg.modules.iost.API.service.IPurchaseorderService;
import org.jeecg.modules.iost.API.webapi.SalesOrderWebapi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Api(tags="采购订单明细接口")
@RestController
@RequestMapping("/API/supplier-send-purchaseorder")
@Slf4j
public class PurchaseorderController {
@Autowired
IPurchaseorderService iPurchaseorderService;
@Autowired
SalesOrderWebapi salesOrderWebapi;
@Autowired
private PurchaseorderApi purchaseorderApi;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网数据同步金蝶成功日志-采购订单接口-分页列表查询")
@ApiOperation(value = "国网数据同步金蝶成功日志-采购订单接口-分页列表查询", notes = "国网数据同步金蝶成功日志-采购订单接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Purchaseorder purchaseorder,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Purchaseorder> queryWrapper = QueryGenerator.initQueryWrapper(purchaseorder, req.getParameterMap());
Page<Purchaseorder> page = new Page<Purchaseorder>(pageNo, pageSize);
IPage<Purchaseorder> pageList = iPurchaseorderService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "同步生成销售订单接口-添加")
@ApiOperation(value = "同步生成销售订单接口-添加", notes = "同步生成销售订单接口-添加")
@GetMapping(value = "/synchronizationList")
public Result<?> synchronizationList() throws IOException, ParseException {
iPurchaseorderService.synchronizationList(null);
return Result.OK();
}
@AutoLog(value = "测试生成销售订单接口-添加")
@ApiOperation(value = "测试生成销售订单接口-添加", notes = "测试生成销售订单接口-添加")
@GetMapping(value = "/selectTEST")
public Result<?> o() throws IOException {
/**
* 拆解获取国网返回数据
*
*/
String s = purchaseorderApi.select();
RequestAnalysis requestAnalysis = com.alibaba.fastjson.JSONObject.parseObject(s, RequestAnalysis.class);
PurchaseordeRequest resultValue = requestAnalysis.getResultValue();
Object data = resultValue.getData();
Map<String, Object> map = (HashMap) com.alibaba.fastjson.JSONObject.parseObject(data.toString(), HashMap.class);
StringBuffer content = new StringBuffer();
content.append("{\"FSaleOrgId\":{\"FNUMBER\":\"100.1.06\"},");
content.append("\"FCustId\":{\"FNUMBER\":\"0000\"},");//“客户”是必填项"
content.append("\"FSaleDeptId\":{\"FNUMBER\":\"BM000037\"},");
content.append("\"FSalerId\":{\"FNUMBER\":\"21000035_GW000913_102018\"},");//“销售员”是必填项
content.append("\"F_PAEZ_Remarks\":\"" + map.get("prjname") + "\",");
content.append("\"F_PAEZ_Combo\":\"A\",");
content.append("\"F_PAEZ_Combo3\":\"B\",");
content.append("\"F_PAEZ_Combo31\":\"F\",");
content.append("\"F_PAEZ_Base2\":{\"FNUMBER\":\"AT.600G\"},");
content.append("\"F_PAEZ_Base4\":{\"FSTAFFNUMBER\":\"001\"},");
content.append("\"F_PAEZ_Combo2\":\"A\",");
content.append("\"F_PAEZ_Combo1\":\"A\",");
content.append("\"F_CYGC_Base\":{\"FNUMBER\":\"0000\"},");
content.append("\"F_PAEZ_Base3\":{\"FNUMBER\":\"01.106026\"},");
/**
* 单据体“订单明细”
* FMaterialId“物料编码”是必填项"" + map.get("materialcode") + "
* FUnitID“销售单位”是必填项
* FPriceUnitId“计价单位”是必填项"
* FStockUnitID 库存单位”是必填项"
*/
content.append("\"FSaleOrderEntry\":[{\"FMaterialId\":{\"FNumber\":\"CMKCHLB05_SYS0030\"},\"FUnitID\":{\"FNumber\": \"Pcs\"},\"FPriceUnitId\":{\"FNumber\":\"Pcs\"},\"FQty\":" + map.get("amount") + ",\"FStockUnitID\":{\"FNumber\":\"Pcs\"}}]}");
String result1 = String.valueOf(content);
System.out.println(result1);
JSONObject jsonObject = JSONObject.fromObject(result1);
String webreq = salesOrderWebapi.add(jsonObject);
System.out.println(webreq);
return Result.OK(s);
}
/**
* 添加
*
* @param object
* @return
*/
@AutoLog(value = "采购订单接口-添加")
@ApiOperation(value="采购订单接口-添加", notes="采购订单接口-添加")
@PostMapping(value = "/synchronization")
public Result<?> synchronization(@RequestBody Object object) {
return Result.OK(iPurchaseorderService.synchronization(object));
}
/**
* 同步
*
* @param object
* @return
*/
@AutoLog(value = "采购订单接口-添加")
@ApiOperation(value="采购订单接口-添加", notes="采购订单接口-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Object object) {
return Result.OK(salesOrderWebapi.add(object));
}
/**
* 采购订单-查询
* @param map
* @return
*/
@GetMapping(value = "/select")
public Result<?> select(@RequestBody Map<String,String> map){
return Result.OK(iPurchaseorderService.select(map));
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.Productinventory;
import org.jeecg.modules.iost.API.entity.pojo.Reservestock;
import org.jeecg.modules.iost.API.service.pojo.ReservestockPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="存放国网备品数据信息")
@RestController
@RequestMapping("/API/seserveStockPojo")
@Slf4j
public class ReserveStockPojoController {
@Autowired
ReservestockPojoService reservestockPojoService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网备品数据信息接口-分页列表查询")
@ApiOperation(value = "国网备品数据信息接口-分页列表查询", notes = "国网备品数据信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Reservestock reservestock,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Reservestock> queryWrapper = QueryGenerator.initQueryWrapper(reservestock, req.getParameterMap());
Page<Reservestock> page = new Page<Reservestock>(pageNo, pageSize);
IPage<Reservestock> pageList = reservestockPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.Salesorder;
import org.jeecg.modules.iost.API.service.pojo.SalesorderPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="销售订单明细信息")
@RestController
@RequestMapping("/API/salesorderPojolist")
@Slf4j
public class SalesOrderPojoController {
@Autowired
SalesorderPojoService salesorderPojoService;
@AutoLog(value = "销售订单明细信息接口-分页列表查询")
@ApiOperation(value = "销售订单明细信息接口-分页列表查询", notes = "销售订单明细信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Salesorder productinventory,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Salesorder> queryWrapper = QueryGenerator.initQueryWrapper(productinventory, req.getParameterMap());
Page<Salesorder> page = new Page<Salesorder>(pageNo, pageSize);
IPage<Salesorder> pageList = salesorderPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.controller.pojo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.iost.API.entity.pojo.Reservestock;
import org.jeecg.modules.iost.API.entity.pojo.Supplylist;
import org.jeecg.modules.iost.API.service.pojo.SupplylistPojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Api(tags="存放国网供货单数据信息")
@RestController
@RequestMapping("/API/supplyListPojo")
@Slf4j
public class SupplyListPojoController {
@Autowired
SupplylistPojoService supplylistPojoService;
/**
* 分页列表查询
*
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "国网备品数据信息接口-分页列表查询")
@ApiOperation(value = "国网备品数据信息接口-分页列表查询", notes = "国网备品数据信息接口-分页列表查询")
@GetMapping(value = "list")
public Result<?> queryPageList(Supplylist supplylist,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Supplylist> queryWrapper = QueryGenerator.initQueryWrapper(supplylist, req.getParameterMap());
Page<Supplylist> page = new Page<Supplylist>(pageNo, pageSize);
IPage<Supplylist> pageList = supplylistPojoService.page(page, queryWrapper);
return Result.OK(pageList);
}
}
package org.jeecg.modules.iost.API.dto;
import java.util.HashMap;
import java.util.Map;
public class EIP {
public static final Map<Integer, String> entity = new HashMap<Integer, String>() {{
put(1, "获取合同和采购订单信息,生成销售订单");
put(2, "供货单");
put(3, "推送销售订单");
put(4, "推送生产订单");
put(5, "推送排产计划");
put(6, "重点材料");
put(7, "推送实物ID信息");
put(8, "备品备件");
put(9, "产成品");
}};
public static String getEIP(Integer id) {
return entity.get(id);
}
}
package org.jeecg.modules.iost.API.dto;
import lombok.Data;
/**
*
*/
@Data
public class PageInfo {
/**当前页码*/
int pageNum;
/**每页条数*/
int pageSize;
/**页数*/
int pageCount;
/**总记录数*/
int total;
}
\ No newline at end of file
package org.jeecg.modules.iost.API.dto;
import lombok.Data;
/**
* 返回体:返回json数据格式
*/
@Data
public class PurchaseordeRequest {
/**状态标识*/
String status ;
/**返回提示消息*/
String message;
Object data;
PageInfo pageInfo = new PageInfo();
}
package org.jeecg.modules.iost.API.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.constant.CommonConstant;
import java.io.Serializable;
/**
* 接口返回数据格式
*/
@Data
@ApiModel(value = "接口返回对象", description = "接口返回对象")
public class Request<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 成功标志
*/
@ApiModelProperty(value = "成功标志")
private boolean successful = true;
/**
* ?
*/
@ApiModelProperty(value = "成功标志")
private String type ;
/**
* ?
*/
@ApiModelProperty(value = "成功标志")
private String resultHint ;
/*
*/
/**
* 返回处理消息h
*//*
@ApiModelProperty(value = "返回处理消息")
private String message = "操作成功!";
*/
/**
* 返回代码
*/
//@ApiModelProperty(value = "返回代码")
// private Integer code = 0;
/**
* 返回数据对象 data
*/
@ApiModelProperty(value = "返回数据对象")
private T resultValue;
/**
* 时间戳
*/
// @ApiModelProperty(value = "时间戳")
// private long timestamp = System.currentTimeMillis();
/**
* 来源系统标识,1:网关;2:品类管理中心
*/
public Request() {
}
public Request<T> successful(String message) {
//this.message = message;
//this.code = CommonConstant.SC_OK_200;
this.successful = true;
return this;
}
@Deprecated
public static Request<Object> ok() {
Request<Object> r = new Request<Object>();
r.setSuccessful(true);
//r.setCode(CommonConstant.SC_OK_200);
//r.setMessage("成功");
r.setType("");
r.setResultHint("");
return r;
}
@Deprecated
public static Request<Object> ok(String msg) {
Request<Object> r = new Request<Object>();
r.setSuccessful(true);
//r.setCode(CommonConstant.SC_OK_200);
//r.setMessage(msg);
r.setType("");
r.setResultHint("");
return r;
}
@Deprecated
public static Request<Object> ok(Object data) {
Request<Object> r = new Request<Object>();
r.setSuccessful(true);
//r.setCode(CommonConstant.SC_OK_200);
//r.setResult(data);
r.setType("");
r.setResultHint("");
r.setResultValue(data);
return r;
}
public static <T> Request<T> OK() {
Request<T> r = new Request<T>();
r.setSuccessful(true);
//r.setCode(CommonConstant.SC_OK_200);
// r.setMessage("成功");
r.setType("");
r.setResultHint("");
return r;
}
public static <T> Request<T> OK(T data) {
Request<T> r = new Request<T>();
r.setSuccessful(true);
//r.setCode(CommonConstant.SC_OK_200);
//r.setResult(data);
r.setType("");
r.setResultHint("");
r.setResultValue(data);
return r;
}
public static <T> Request<T> OK(String msg, T data) {
Request<T> r = new Request<T>();
r.setSuccessful(true);
//r.setCode(CommonConstant.SC_OK_200);
// r.setMessage(msg);
r.setType("");
r.setResultHint("");
r.setResultValue(data);
return r;
}
public static Request<Object> error(String msg) {
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
}
public static Request<Object> error10001(String msg) {
return error(10001, msg);
}
public static Request<Object> error(int code, String msg) {
Request<Object> r = new Request<Object>();
//r.setCode(code);
// r.setMessage(msg);
r.setType("");
r.setResultHint("");
r.setSuccessful(false);
return r;
}
public Request<T> error500(String message) {
//this.message = message;
//this.code = CommonConstant.SC_INTERNAL_SERVER_ERROR_500;
this.successful = false;
return this;
}
/**
* 无权限访问返回结果
*/
public Request noauth(String msg) {
return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg);
}
@JsonIgnore
private String onlTable;
}
package org.jeecg.modules.iost.API.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 接口返回数据格式
*/
@Data
@ApiModel(value = "接口返回对象", description = "接口返回对象")
public class RequestAnalysis implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 成功标志
*/
@ApiModelProperty(value = "成功标志")
private boolean successful = true;
/**
* ?
*/
@ApiModelProperty(value = "成功标志")
private String type ;
/**
* ?
*/
@ApiModelProperty(value = "成功标志")
private String resultHint ;
/*
*/
/**
* 返回处理消息h
*//*
@ApiModelProperty(value = "返回处理消息")
private String message = "操作成功!";
*/
/**
* 返回代码
*/
//@ApiModelProperty(value = "返回代码")
// private Integer code = 0;
/**
* 返回数据对象 data
*/
@ApiModelProperty(value = "返回数据对象")
private PurchaseordeRequest resultValue;
/**
* 时间戳
*/
// @ApiModelProperty(value = "时间戳")
// private long timestamp = System.currentTimeMillis();
/**
* 来源系统标识,1:网关;2:品类管理中心
*/
public RequestAnalysis() {
}
@JsonIgnore
private String onlTable;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 国网日志
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("grid_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="grid_error对象", description="国网日志请求")
public class GridError implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createtime;
//传入国网数据
private String requestjson;
//国网响应数据
private String responsejson;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
/**
* 是否已成功:失败:0,成功:1
*/
private Integer successagain;
/**业务编号**/
private Integer businessNo;
// 传入的业务
private String businessName;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 国网日志请求
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("grid_error_return_process")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="grid_error对象", description="国网日志请求")
public class GridErrorReturnProcess implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createtime;
//传入国网数据
private String requestjson;
//国网响应数据
private String responsejson;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
/**
* 是否已成功:失败:0,成功:1
*/
private Integer successagain;
/**业务编号**/
private Integer businessNo;
// 传入的业务
private String businessName;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 国网供应商重点原材料库存API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("materialinventoryerro_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="materialinventory对象", description="国网供应商重点原材料库存API")
public class Materialinventoryerror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 实物ID信息明细
* @Author: jeecg-boot
* @Date: 2021-07-09
* @Version: V1.0
*/
@Data
@TableName("supplier_end_physicalid")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "physicalid对象", description = "实物ID信息明细")
public class Physicalid implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
@Excel(name = "采购方总部编码", width = 15)
@ApiModelProperty(value = "采购方总部编码")
private String purchaserhqcode;
/**
* 供应商编码
*/
@Excel(name = "供应商编码", width = 15)
@ApiModelProperty(value = "供应商编码")
private String suppliercode;
/**
* 供应商名称
*/
@Excel(name = "供应商名称", width = 15)
@ApiModelProperty(value = "供应商名称")
private String suppliername;
/**
* 实物ID
*/
@Excel(name = "实物ID", width = 15)
@ApiModelProperty(value = "实物ID")
private String entitycode;
/**
* 采购订单行项目id
*/
@Excel(name = "采购订单行项目id", width = 15)
@ApiModelProperty(value = "采购订单行项目id")
private String poitemid;
/**
* 实物生产状态:0:未生产 1:生产中 2:生产完成
*/
@Excel(name = "实物生产状态:0:未生产 1:生产中 2:生产完成", width = 15)
@ApiModelProperty(value = "实物生产状态:0:未生产 1:生产中 2:生产完成")
private String entitystatus;
/**
* 数据来源:0:供应商, 1:网关, 2:代理
*/
@Excel(name = "数据来源:0:供应商, 1:网关, 2:代理", width = 15)
@ApiModelProperty(value = "数据来源:0:供应商, 1:网关, 2:代理")
private String datasource;
/**
* 来源数据创建时间
*/
@Excel(name = "来源数据创建时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "来源数据创建时间")
private Date datasourcecreatetime;
/**
* 备注
*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remark;
/**
* 数据拥有方:取值:供应商编码
*/
@Excel(name = "数据拥有方:取值:供应商编码", width = 15)
@ApiModelProperty(value = "数据拥有方:取值:供应商编码")
private String ownerid;
/**
* 数据可见方:取值:采购方编码
*/
@Excel(name = "数据可见方:取值:采购方编码", width = 15)
@ApiModelProperty(value = "数据可见方:取值:采购方编码")
private String openid;
/**
* 审核日期记录
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss.SSS")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
@ApiModelProperty(value = "审核日期记录")
private Date fapprovedate;
//*实体主键*//
private String fbillno;
/**单据编号**/
private String fid;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 国网实物ID信息API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("physicalid_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="physicalid_api对象", description="国网实物ID信息API")
public class Physicaliderror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createtime;
//传入国网数据
private String requestjson;
//国网响应数据
private String responsejson;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 国网产成品库存信息API
* @Author: jeecg-boot
* @Date: 2021-07-15
* @Version: V1.0
*/
@Data
@TableName("productinventory_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="productinventory_api对象", description="国网产成品库存信息API")
public class Productinventoryerror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 国网生产订单API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("productionorder_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="productionorder_api对象", description="国网生产订单API")
public class Productionordererror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 排产计划
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("productionscheduling_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="productionscheduling_api对象", description="排产计划")
public class Productionschedulingerror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 采购订单明细
* @Author: jeecg-boot
* @Date: 2021-07-09
* @Version: V1.0
*/
@Data
@TableName("supplier_end_purchaseorder")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "purchaseorder对象", description = "采购订单明细")
public class Purchaseorder implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 采购订单编码
*/
private String poNo;
/**
* 采购订单行项目号
*/
private String poItemNo;
/**
* 采购订单行项目id
*/
private String poItemId;
/**
* 合同编号
*/
private String conCode;
/**
* 合同名称
*/
private String conName;
/**
* 采购方公司名称
*/
private String buyerName;
/**
* 采购方公司编码
*/
private String buyerCode;
/**
* 采购方物料编码
*/
private String materialCode;
/**
* 采购方物料描述
*/
private String materialDesc;
/**
* 采购数量
*/
private String amount;
/**
* 合同编号(国网经法)
*/
private String sellerConCode;
/**
* 技术规范流水号
*/
private String serialNumber;
/**
* 合同签订日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date sellerSignTime;
/**
* 合同类型:1标准合同;2协议库存;3采购供货单
*/
private int conType;
/**
* 项目编号
*/
private String prjCode;
/**
* 工程项目名称
*/
private String prjName;
/**
* 物资编码
*/
private String matCode;
/**
* 采购技术固化ID
*/
private String fixedTechId;
/**
* 合同包号/
* private String pkgNo;
* /**招标批次号
*/
private String bidBatCode;
/**
* 固化ID描述
*/
private String extDes;
/**
* 物资大类编码
*/
private String matMaxCode;
/**
* 物资中类编码
*/
private String matMedCode;
/**
* 物资小类编码
*/
private String matMinCode;
/**
* 物资大类名称
*/
private String matMaxName;
/**
* 物资中类名称
*/
private String matMedName;
/**
* 物资小类名称
*/
private String matMinName;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date modifyTime;
/**
* 销售订单内码
*/
private String FId;
/**
* 销售订单编码
*/
private String FNumber;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 采购订单国网日志
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("Purchaseorder_errors")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="purchaseorder_error对象", description="采购订单国网日志")
public class Purchaseordererror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createtime;
//传入国网数据
// private String requestjson;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 国网报工信息API
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("reportwork_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="reportwork对象", description="国网报工信息API")
public class Reportworkerror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 国网备品备件库存API
* @Author: jeecg-boot
* @Date: 2021-07-15
* @Version: V1.0
*/
@Data
@TableName("reservestock_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="reservestock_api对象", description="国网备品备件库存API")
public class Reservestockerror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
package org.jeecg.modules.iost.API.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 销售订单
* @Author: jeecg-boot
* @Date: 2021-07-14
* @Version: V1.0
*/
@Data
@TableName("salesorder_error")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="salesorder_api对象", description="国网销售订单API")
public class Salesordererror implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**报错代码*/
private Integer status;
/**返回信息*/
private String message;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createtime;
/**数据*/
private String json;
/**数据同步:失败:0,成功:1*/
private Integer synchronization;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论