Commit c99ed9f9 by 肖洋洋

外部接口对接代码

parent 9dc958d4
Showing with 4895 additions and 539 deletions
......@@ -16,6 +16,11 @@
<dependencies>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.47</version>
......
......@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
//@EnableScheduling
public class Application {
public static void main(String[] args) {
......
......@@ -17,10 +17,11 @@ import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Component
public class SyncInvItem {
private final static Logger logger = LoggerFactory.getLogger(SyncInvItem.class);
......@@ -53,11 +54,12 @@ public class SyncInvItem {
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
data.put("uniquekey","获取商品资料列表");
data.put("uniquekey","获取区域列表");
data.put("timestamp", getTimestamp());
System.err.println(new Date());
data.put("begintime","1995-12-23 00:00:00");
data.put("endTime","1996-12-23 00:00:00");
//data.put("begintime","1995-12-23 00:00:00");
// data.put("begintime","2015-01-11 18:00:00");
// data.put("endTime","2020-06-12 18:00:00");
Map headers=new HashMap();
headers.put("Content-Type","application/json");
headers.put("token",token);
......@@ -69,8 +71,12 @@ public class SyncInvItem {
e.printStackTrace();
}
//String post = HttpUtilPMP.post("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", data, headers, 6000, 6000, "utf-8",tempEncryptKey);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
System.err.println(new String(bytes));
System.err.println(retMsg);
System.err.println(retMsg.size());
}
......
package orthopedics.client;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import orthopedics.dao.InvItemBalanceSummaryVMapper;
import orthopedics.dao.SalOrderHeaderMapper;
import orthopedics.model.InvItemBalanceSummaryV;
import orthopedics.model.SalOrderHeader;
import orthopedics.util.*;
import java.util.*;
@Component
public class SyncItemSku {
private final static Logger logger = LoggerFactory.getLogger(SyncItemSku.class);
@Autowired
private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper;
/**
* 将商品库存同步到PMP
*/
@Scheduled(cron = "0 * * * * ? ")
@Transactional
public void scheduler(){
List<InvItemBalanceSummaryV> select = invItemBalanceSummaryVMapper.findByAttribute2();
if(select!=null && select.size()>0){
String gettoken = HttpUtilRSA.getToken();
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
List<JSONObject> plulist=new ArrayList<>();
for (InvItemBalanceSummaryV invItemBalanceSummaryV:select) {
JSONObject jsonObject=new JSONObject();
if(invItemBalanceSummaryV.getLocator_id()!=null && invItemBalanceSummaryV.getBalance()!=null){
jsonObject.put("wh",invItemBalanceSummaryV.getInv_id());
jsonObject.put("rack",invItemBalanceSummaryV.getLocator_id());
jsonObject.put("plucode",invItemBalanceSummaryV.getPlucode());
jsonObject.put("qty",invItemBalanceSummaryV.getBalance());
plulist.add(jsonObject);
}
}
data.put("uniquekey","外系统库存数据回传");
data.put("timestamp", StringUtil.getTimestamp());
data.put("plulist",plulist);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = new byte[0];
try {
bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
String s = new String(bytes);
System.err.println(s);
JSONObject object = JSONObject.parseObject(s);
Object result = object.get("result");
if(result==null||!result.equals("success")){
logger.error((String) object.get("ret_msg"));
}
} catch (Exception e) {
logger.error(e.getMessage());
}
}
}
}
package orthopedics.client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import orthopedics.dao.InvItemMapper;
import orthopedics.model.InvItem;
import java.sql.*;
import java.util.List;
@Component
public class SyncItemToPos {
private final static Logger logger = LoggerFactory.getLogger(SyncItemToPos.class);
@Autowired
private InvItemMapper invItemMapper;
/**
* 将ERP创建的商品同步到POS(只同步外采的商品)
*/
@Scheduled(cron = "0 * * * * ? ")
@Transactional
public void scheduler(){
List<InvItem> invItems = invItemMapper.findByAttribute2AndAttribute6();
if(invItems!=null && invItems.size()>0){
Connection ct=null;
PreparedStatement ps=null;
ResultSet rs=null;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
ct= DriverManager.getConnection("jdbc:sqlserver://130.1.0.32:1433;DatabaseName=shoptxns","wjkj","wjkj123456");
for (InvItem invItem:invItems) {
ps=ct.prepareStatement("insert into plu values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,invItem.getItemCode());
ps.setString(2,invItem.getItemName());
//ps.setString(3,invItem.getAttribute1());
ps.setString(3,"");
ps.setString(4,"");
ps.setString(5,"");
ps.setString(6,"");
ps.setInt(7,(int)(Float.parseFloat("12.56")*100));
ps.setInt(8,0);
ps.setInt(9,(int)(Float.parseFloat("12.56")*100));
ps.setInt(10,(int)(Float.parseFloat("12.56")*100));
ps.setInt(11,(int)(Float.parseFloat("12.56")*100));
ps.setString(12,"-");
java.sql.Date date = new java.sql.Date(new java.util.Date().getTime()); //构建一个
ps.setDate(13,date);
ps.setInt(14,0);
ps.setString(15,"由erp同步");
ps.setInt(16,Integer.parseInt(invItem.getTax()));
int i = ps.executeUpdate();
if(i==1){
invItemMapper.updateByAttribute6(invItem.getId(),"1");
logger.info("将ERP创建的商品同步到POS成功");
}else{
logger.info("将ERP创建的商品同步到POS失败");
}
}
} catch (Exception e) {
logger.error("将ERP创建的商品同步到POS请求或处理异常");
}finally {
try {
if(rs!=null){
rs.close();
}
if(ps!=null){
ps.close();
}
if(ct!=null){
ct.close();
}
} catch (SQLException e) {
logger.error("将ERP创建的商品同步到POS流关闭异常");
}
}
}
}
}
package orthopedics.client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import orthopedics.dao.InvItemMapper;
import orthopedics.dao.SalOrderHeaderMapper;
import orthopedics.dao.SalOrderLineMapper;
import orthopedics.model.InvItem;
import orthopedics.model.SalOrderHeader;
import orthopedics.model.SalOrderLine;
import orthopedics.service.PropertiesServer;
import orthopedics.util.UuidUtil;
import java.math.BigDecimal;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.List;
import java.util.UUID;
@Component
public class SyncSalFromPos {
private final static Logger logger = LoggerFactory.getLogger(SyncSalFromPos.class);
@Autowired
private InvItemMapper invItemMapper;
@Autowired
private SalOrderHeaderMapper salOrderHeaderMapper;
@Autowired
private SalOrderLineMapper salOrderLineMapper;
@Autowired
PropertiesServer propertiesServer;
/**
* 将POS的销售订单同步到ERP(只同步我们同步过去的商品的销售订单)
*/
@Scheduled(cron = "0 * * * * ? ")
@Transactional
public void scheduler(){
List<InvItem> invItems = invItemMapper.findByAttribute2();
if(invItems!=null && invItems.size()>0){
Connection ct=null;
PreparedStatement ps=null;
ResultSet rs=null;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
ct= DriverManager.getConnection("jdbc:sqlserver://130.1.0.32:1433;DatabaseName=shoptxns","wjkj","wjkj123456");
for (InvItem invItem:invItems) {
ps=ct.prepareStatement("select * from shoptxns where code=?");
ps.setString(1,invItem.getItemCode());
rs = ps.executeQuery();
while (rs.next()){
Timestamp timestamp = rs.getTimestamp(3);//订单时间
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String dateStr = sdf.format(date);
String paymentMethod = rs.getString(8);//支付方式
int quantity = rs.getInt(13);//数量
int attribute1 = rs.getInt(14);//单价
int attribute3 = rs.getInt(15);//折扣
int attribute2 = rs.getInt(16);//订单总价
//封装主表数据
SalOrderHeader salOrderHeader=new SalOrderHeader();
String hid = UuidUtil.get32UUIDString();
salOrderHeader.setId(hid);
salOrderHeader.setCreateTime(LocalDateTime.now());
salOrderHeader.setSysOrgCode("A04");
salOrderHeader.setOrgId("2c9007626dde3f4f016deda2151f1a42");
salOrderHeader.setOrderTypeId("000000006c60dba1016c661283010034");
if(timestamp!=null){
Date date = new Date(timestamp.getTime());
LocalDateTime ldt = date.toInstant()
.atZone( ZoneId.systemDefault() )
.toLocalDateTime();
salOrderHeader.setOrderDate(ldt);
}
salOrderHeader.setOrderNumber(propertiesServer.generateFlowingWater("SAL_ORDER_NUMBER"));
salOrderHeader.setCustomerId("2c9007626df2ab5b016dfd0edccb0039");
salOrderHeader.setOrderCurrency("CNY");
if(paymentMethod.equals("001")){
salOrderHeader.setPaymentMethod("CASH");
}else if(paymentMethod.equals("098")){
salOrderHeader.setPaymentMethod("ALIPAY");
}else if(paymentMethod.equals("099")){
salOrderHeader.setPaymentMethod("WECHAT");
}else{
salOrderHeader.setPaymentMethod("OTHER");
}
salOrderHeader.setSellerId("a9a2c497f64011e9a1b10242ac110002");
//封装从表数据
SalOrderLine salOrderLine=new SalOrderLine();
salOrderLine.setId(UuidUtil.get32UUIDString());
salOrderLine.setCreateTime(LocalDateTime.now());
salOrderLine.setSysOrgCode("A04");
salOrderLine.setOrgId("2c9007626dde3f4f016deda2151f1a42");
salOrderLine.setSalOrderHeaderId(hid);
salOrderLine.setLineNumber("1");
salOrderLine.setItemCode(invItem.getItemCode());
salOrderLine.setItemName(invItem.getItemName());
salOrderLine.setItemDesc(invItem.getItemDesc());
salOrderLine.setQuantity(quantity);
salOrderLine.setUnitCode("BEN");
salOrderLine.setSalePrice(BigDecimal.valueOf(attribute1/100));
salOrderLine.setTaxRate("0");
salOrderLine.setAttribute3(attribute3/100+"");
salOrderLine.setAttribute2(Double.valueOf(attribute2/100));
salOrderLine.setLineStatus("completed");
salOrderLine.setOrderHeaderId(hid);
salOrderLine.setItemId(invItem.getId());
salOrderHeaderMapper.insert(salOrderHeader);
salOrderLineMapper.insert(salOrderLine);
invItemMapper.updateByAttribute6(invItem.getId(),"2");
}
}
} catch (Exception e) {
logger.error("将POS的销售订单同步到ERP请求或处理异常");
}finally {
try {
if(rs!=null){
rs.close();
}
if(ps!=null){
ps.close();
}
if(ct!=null){
ct.close();
}
} catch (SQLException e) {
logger.error("将POS的销售订单同步到ERP流关闭异常");
}
}
}
}
}
package orthopedics.client;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import orthopedics.dao.InvItemMapper;
import orthopedics.dao.InvLocatorMapper;
import orthopedics.dao.InvSubinventoryMapper;
import orthopedics.dao.SalOrderLineVMapper;
import orthopedics.model.*;
import orthopedics.util.Aes;
import orthopedics.util.HttpUtilPMP;
import orthopedics.util.HttpUtilRSA;
import orthopedics.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
@Component
public class SyncSalOrderHeader {
private final static Logger logger = LoggerFactory.getLogger(SyncSalOrderHeader.class);
@Autowired
private SalOrderLineVMapper salOrderLineVMapper;
@Autowired
private InvItemMapper invItemMapper;
@Autowired
private InvSubinventoryMapper invSubinventoryMapper;
@Autowired
private InvLocatorMapper invLocatorMapper;
/**
* 将销售订单同步到PMP
*/
@Scheduled(cron = "0 * * * * ? ")
@Transactional
public void scheduler(){
List<SalOrderLineV> byPMP = salOrderLineVMapper.findByPMP();
if(byPMP!=null && byPMP.size()>0){
String gettoken = HttpUtilRSA.getToken();
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
List<JSONObject> billlist=new ArrayList<>();
for (SalOrderLineV salOrderLineV:byPMP) {
JSONObject jsonObject=new JSONObject();
jsonObject.put("number",salOrderLineV.getOrderNumber());
jsonObject.put("seq",salOrderLineV.getLineNumber());
jsonObject.put("plucode",salOrderLineV.getPlucode());
// jsonObject.put("fwh",salOrderLineV);
InvItem invItem = invItemMapper.selectInvItemById(salOrderLineV.getItemId());
if(invItem==null){
logger.error("销售订单商品id【"+salOrderLineV.getItemId()+"】查询不到商品信息");
return;
}
if(StringUtil.isEmpty(invItem.getInvId())){
logger.error("销售订单商品id【"+salOrderLineV.getItemId()+"】查询商品信息库存id为空");
return;
}
List<InvSubinventory> invSubinventories = invSubinventoryMapper.selectByInvIdAndSubinvName(invItem.getInvId());
if(invSubinventories==null||invSubinventories.size()<=0){
logger.error("商品code:"+invItem.getItemCode()+"库存id查询不到库区");
return;
}
List<InvLocator> byInvIdAndSubinvId = invLocatorMapper.findByInvIdAndSubinvId(invItem.getInvId(), invSubinventories.get(0).getId());
if(invSubinventories==null||invSubinventories.size()<=0){
logger.error("商品code:"+invItem.getItemCode()+"库存id和存储库区id查询不到货架");
return;
}
jsonObject.put("frack",byInvIdAndSubinvId.get(0).getLocatorCode());
jsonObject.put("qty",salOrderLineV.getQuantity());
jsonObject.put("disc",salOrderLineV.getAttribute3());
jsonObject.put("apvby",salOrderLineV.getOrderDate());
jsonObject.put("apvtime",salOrderLineV.getOrderDate());
billlist.add(jsonObject);
}
data.put("uniquekey","外系统内部调仓数据回传");
data.put("timestamp", StringUtil.getTimestamp());
data.put("billlist",billlist);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = new byte[0];
try {
bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
String s = new String(bytes);
System.err.println(s);
JSONObject object = JSONObject.parseObject(s);
Object result = object.get("result");
if(result==null||!result.equals("success")){
logger.error((String) object.get("ret_msg"));
}
} catch (Exception e) {
logger.error(e.getMessage());
}
}
}
}
package orthopedics.controller.bookcity;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import orthopedics.dao.InvCategoryMapper;
import orthopedics.dao.InvCountHeaderMapper;
import orthopedics.dao.InvCountLineMapper;
import orthopedics.model.InvCountHeader;
import orthopedics.model.InvCountLine;
import orthopedics.model.SysAccessToken;
import orthopedics.dao.*;
import orthopedics.model.*;
import orthopedics.service.PropertiesServer;
import orthopedics.service.UserServer;
import orthopedics.util.Result;
......@@ -18,10 +13,12 @@ import orthopedics.util.StatusCode;
import orthopedics.util.StringUtil;
import orthopedics.util.UuidUtil;
import orthopedics.vo.InvCountHeaderPage;
import orthopedics.vo.FindByCountNumberToSku;
import java.time.LocalDate;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@RestController
......@@ -42,14 +39,45 @@ public class InvCountHeaderController {
@Autowired
private CheckController checkController;
@Autowired
private HrOrganizationMapper hrOrganizationMapper;
@Autowired
private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper;
@PostMapping("/add")
@Transactional
public Result add(@RequestBody InvCountHeaderPage invCountHeaderPage, @RequestParam(value = "access_token",required = true)String token){
if(invCountHeaderPage==null){
return new Result(false, StatusCode.ERROR,"参数为空");
}
SysAccessToken sysAccessToken = userServer.checkToken(token);
List<SysOrgAccess> sysOrgAccesses = userServer.selectSysOrgAccessByUserId(sysAccessToken.getUserId());
if(sysOrgAccesses==null || sysOrgAccesses.size()<=0){
return new Result(false, StatusCode.ERROR,"当前用户不属于任何组织");
}
String s = hrOrganizationMapper.selectOrgCode(sysOrgAccesses.get(0).getOrgId());
if(StringUtil.isEmpty(s)){
return new Result(false, StatusCode.ERROR,"当前用户组织信息需要维护");
}
if(!StringUtil.isEmpty(invCountHeaderPage.getCountNumber())){
InvCountHeader invCountHeader = invCountHeaderMapper.fingByCountNumber(invCountHeaderPage.getCountNumber());
if(invCountHeader==null){
return new Result(false, StatusCode.ERROR,"错误盘点单号");
}
List<InvCountLine> invCountLines = invCountLineMapper.selectByInvCountHeaderId(invCountHeader.getId());
if(invCountLines==null || invCountLines.size()<=0){
return new Result(false, StatusCode.ERROR,"盘点单缺少行数据");
}
//行数据封装
List<InvCountLine> invCountLineList = invCountHeaderPage.getInvCountLineList();
for (InvCountLine invCountLine:invCountLineList) {
invCountLineMapper.editCreateByAndUpdateTime(invCountLine.getId(),sysAccessToken.getUserName(),new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()),invCountLine.getDifferentQuantity(),invCountLine.getAttribute2());
}
return new Result(true,StatusCode.OK,"盘点单更新成功",invCountHeader.getCountNumber());
}
String uuidString = UuidUtil.get32UUIDString();
//头数据封装
......@@ -67,12 +95,16 @@ public class InvCountHeaderController {
invCountHeaderPage.setCountDate(LocalDateTime.now());
invCountHeaderPage.setCounter(sysAccessToken.getUserName());
invCountHeaderPage.setHeaderStatus("new");
invCountHeaderPage.setSysOrgCode(s);
//行数据封装
List<InvCountLine> invCountLineList = invCountHeaderPage.getInvCountLineList();
if(invCountLineList==null||invCountLineList.size()<=0){
return new Result(false, StatusCode.ERROR,"没有行数据");
}
for (InvCountLine invCountLine:invCountLineList) {
if(StringUtil.isEmpty(invCountLine.getItemId())){
return new Result(false, StatusCode.ERROR,"行数据缺少商品id");
}
invCountLine.setId(UuidUtil.get32UUIDString());
invCountLine.setInvCountHeaderId(uuidString);
invCountLine.setCreateBy(sysAccessToken.getUserName());
......@@ -94,4 +126,77 @@ public class InvCountHeaderController {
// Result result = checkController.checkInvItem(token, jsonObject);
return new Result(true,StatusCode.OK,"盘点单保存成功",count_number);
}
@GetMapping("/findByCountNumber")
public Result findByCountNumber(@RequestParam(value = "access_token",required = true)String token,@RequestParam(value = "countNumber",required = true) String countNumber){
SysAccessToken sysAccessToken = userServer.checkToken(token);
List<InvCountHeaderPage> ichp=new ArrayList<>();
if(StringUtil.isEmpty(countNumber)){
List<SysOrgAccess> sysOrgAccesses = userServer.selectSysOrgAccessByUserId(sysAccessToken.getUserId());
if(sysOrgAccesses==null || sysOrgAccesses.size()<=0){
return new Result(false, StatusCode.ERROR,"当前用户不属于任何组织");
}
for (SysOrgAccess sysOrgAccess:sysOrgAccesses) {
String s = hrOrganizationMapper.selectOrgCode(sysOrgAccess.getOrgId());
if(s==null){
continue;
}
List<InvCountHeader> invCountHeaders = invCountHeaderMapper.fingBySysOrgCode(s);
if(invCountHeaders==null || invCountHeaders.size()<=0){
continue;
}
for (InvCountHeader invCountHeader:invCountHeaders) {
InvCountHeaderPage invCountHeaderPage=new InvCountHeaderPage();
BeanUtils.copyProperties(invCountHeader,invCountHeaderPage);
List<InvCountLine> invCountLines = invCountLineMapper.selectByInvCountHeaderId(invCountHeader.getId());
if(invCountLines==null || invCountLines.size()<=0){
continue;
}
invCountHeaderPage.setInvCountLineList(invCountLines);
ichp.add(invCountHeaderPage);
}
}
return new Result(true,StatusCode.OK,"盘点单查询成功",ichp);
}
InvCountHeaderPage invCountHeaderPage=new InvCountHeaderPage();
InvCountHeader invCountHeader = invCountHeaderMapper.fingByCountNumber(countNumber);
if(invCountHeader==null){
return new Result(false, StatusCode.ERROR,"盘点单号查询不到数据");
}
List<InvCountLine> invCountLines = invCountLineMapper.selectByInvCountHeaderId(invCountHeader.getId());
BeanUtils.copyProperties(invCountHeader,invCountHeaderPage);
invCountHeaderPage.setInvCountLineList(invCountLines);
return new Result(true,StatusCode.OK,"盘点单查询成功",invCountHeaderPage);
}
@GetMapping("/findByCountNumberToSku")
public Result findByCountNumberToSku(@RequestParam(value = "access_token",required = true)String token,@RequestParam(value = "countNumber",required = true) String countNumber){
SysAccessToken sysAccessToken = userServer.checkToken(token);
if(StringUtil.isEmpty(countNumber)){
return new Result(false, StatusCode.ERROR,"盘点单号为空");
}
InvCountHeader invCountHeader = invCountHeaderMapper.fingByCountNumber(countNumber);
if(invCountHeader==null){
return new Result(false, StatusCode.ERROR,"盘点单号查询不到数据");
}
List<InvCountLine> invCountLines = invCountLineMapper.selectByInvCountHeaderId(invCountHeader.getId());
if(invCountLines==null || invCountLines.size()<=0){
return new Result(false, StatusCode.ERROR,"盘点单号为【"+countNumber+"】没有行数据");
}
List<FindByCountNumberToSku> invItemBalanceSummaryVList=new ArrayList<>();
for (InvCountLine invCountLine:invCountLines) {
if(StringUtil.isEmpty(invCountLine.getItemId())){
continue;
}
List<InvItemBalanceSummaryV> invItemBalanceSummaryVS = invItemBalanceSummaryVMapper.findByInvIdAndSubinvIdAndLocatorIdAndItemId(invCountLine.getInvId(),invCountLine.getSubinvId(),invCountLine.getLocatorId(),invCountLine.getItemId());
for (InvItemBalanceSummaryV invItemBalanceSummaryV:invItemBalanceSummaryVS) {
FindByCountNumberToSku findByCountNumberToSku= new FindByCountNumberToSku();
BeanUtils.copyProperties(invItemBalanceSummaryV,findByCountNumberToSku);
findByCountNumberToSku.setInvCountLine(invCountLine);
invItemBalanceSummaryVList.add(findByCountNumberToSku);
}
}
return new Result(true, StatusCode.OK,"查询成功",invItemBalanceSummaryVList);
}
}
package orthopedics.controller.bookcity;
import org.springframework.beans.BeanUtils;
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 orthopedics.dao.*;
import orthopedics.model.*;
import orthopedics.service.UserServer;
import orthopedics.util.Result;
import orthopedics.util.StatusCode;
import orthopedics.util.StringUtil;
import orthopedics.vo.InvCountPrintPage;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("/bookcity/invCountPrint")
public class InvCountPrintController {
@Autowired
private UserServer userServer;
@Autowired
private HrOrganizationMapper hrOrganizationMapper;
@Autowired
private InvCountPrintMapper invCountPrintMapper;
@Autowired
private InvCountPrintLineMapper invCountPrintLineMapper;
@Autowired
private SysDictItemMapper sysDictItemMapper;
@Autowired
private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper;
@GetMapping("/findByPrintNumber")
public Result findByPrintNumber(@RequestParam(value = "access_token",required = true)String token, @RequestParam(value = "printNumber",required = true) String printNumber){
SysAccessToken sysAccessToken = userServer.checkToken(token);
List<InvCountPrintPage> ichp=new ArrayList<>();
if(StringUtil.isEmpty(printNumber)){
List<SysOrgAccess> sysOrgAccesses = userServer.selectSysOrgAccessByUserId(sysAccessToken.getUserId());
if(sysOrgAccesses==null || sysOrgAccesses.size()<=0){
return new Result(false, StatusCode.ERROR,"当前用户不属于任何组织");
}
for (SysOrgAccess sysOrgAccess:sysOrgAccesses) {
List<InvCountPrint> invCountPrintList = invCountPrintMapper.findByOrgId(sysOrgAccess.getOrgId());
for (InvCountPrint invCountPrint:invCountPrintList) {
InvCountPrintPage invCountPrintPage=new InvCountPrintPage();
BeanUtils.copyProperties(invCountPrint,invCountPrintPage);
List<InvCountPrintLine> invCountPrintLines = invCountPrintLineMapper.findByPrintId(invCountPrint.getId());
if(invCountPrintLines==null || invCountPrintLines.size()<=0){
continue;
}
invCountPrintPage.setInvCountPrintLines(invCountPrintLines);
ichp.add(invCountPrintPage);
}
}
return new Result(true,StatusCode.OK,"盘点计划查询成功",ichp);
}
InvCountPrintPage invCountPrintPage=new InvCountPrintPage();
InvCountPrint byPrintNumber = invCountPrintMapper.findByPrintNumber(printNumber);
if(byPrintNumber==null){
return new Result(false, StatusCode.ERROR,"判断顺序号查询不到数据");
}
List<InvCountPrintLine> byPrintId = invCountPrintLineMapper.findByPrintId(byPrintNumber.getId());
BeanUtils.copyProperties(byPrintNumber,invCountPrintPage);
invCountPrintPage.setInvCountPrintLines(byPrintId);
return new Result(true,StatusCode.OK,"盘点计划查询成功",invCountPrintPage);
}
@GetMapping("/findByPrintNumberToSku")
public Result findByPrintNumberToSku(@RequestParam(value = "access_token",required = true)String token, @RequestParam(value = "printNumber",required = true) String printNumber){
SysAccessToken sysAccessToken = userServer.checkToken(token);
if(StringUtil.isEmpty(printNumber)){
return new Result(false, StatusCode.ERROR,"顺序号为空");
}
InvCountPrint byPrintNumber = invCountPrintMapper.findByPrintNumber(printNumber);
if(byPrintNumber==null){
return new Result(false, StatusCode.ERROR,"判断顺序号查询不到数据");
}
List<InvCountPrintLine> byPrintId = invCountPrintLineMapper.findByPrintId(byPrintNumber.getId());
if(byPrintId==null || byPrintId.size()<=0){
return new Result(false, StatusCode.ERROR,"顺序号为【"+printNumber+"】没有子表数据");
}
String sql = "";
String sqld="'";
for (InvCountPrintLine invCountPrintLine:byPrintId) {
SysDictItem sysDictItem = sysDictItemMapper.findByItemValue(invCountPrintLine.getCompare());
if(sysDictItem==null){
continue;
}
if(sysDictItem.getItemText().indexOf("like")!=-1){
if(sql.equals("")){
sql =sql+ " "+invCountPrintLine.getFields()+" "+sysDictItem.getItemText()+" "+sqld+"%"+invCountPrintLine.getComparisonValues()+"%"+sqld;
}else{
sql =sql+ " and "+invCountPrintLine.getFields()+" "+sysDictItem.getItemText()+" "+sqld+"%"+invCountPrintLine.getComparisonValues()+"%"+sqld;
}
}else{
if(sql.equals("")){
sql =sql+ " "+invCountPrintLine.getFields()+" "+sysDictItem.getItemText()+" "+sqld+invCountPrintLine.getComparisonValues()+sqld;
}else{
sql =sql+ " and "+invCountPrintLine.getFields()+" "+sysDictItem.getItemText()+" "+sqld+invCountPrintLine.getComparisonValues()+sqld;
}
}
}
List<InvItemBalanceSummaryV> bySql = invItemBalanceSummaryVMapper.findBySql(sql);
return new Result(true, StatusCode.OK,"查询成功",bySql);
}
}
package orthopedics.controller.pda;
import org.springframework.beans.BeanUtils;
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 orthopedics.dao.InvLocatorMapper;
import orthopedics.dao.InvSubinventoryMapper;
import orthopedics.dao.RcvParameterMapper;
import orthopedics.model.InvLocator;
import orthopedics.model.InvSubinventory;
import orthopedics.model.RcvParameter;
import orthopedics.model.SysAccessToken;
import orthopedics.service.UserServer;
import orthopedics.util.Result;
import orthopedics.util.StatusCode;
import orthopedics.util.StringUtil;
import orthopedics.vo.RcvParameterPage;
import java.util.ArrayList;
import java.util.List;
/**
* 接收参数接口
*
*/
@RestController
@RequestMapping("/pda/RcvParameter")
public class RcvParameterController {
@Autowired
private RcvParameterMapper rcvParameterMapper;
@Autowired
private UserServer userServer;
@Autowired
private InvSubinventoryMapper invSubinventoryMapper;
@Autowired
private InvLocatorMapper invLocatorMapper;
/**
* 通过库存id查询默认库区和货架
* @param token
* @param invId
* @return
*/
@GetMapping("/findByInvId")
public Result findByInvId(@RequestParam("access_token")String token,@RequestParam("invId")String invId) {
SysAccessToken sysAccessToken = userServer.checkToken(token);
List<RcvParameterPage> rcvParameterPageList=new ArrayList<>();
if(StringUtil.isEmpty(invId)){
List<RcvParameter> select = rcvParameterMapper.select();
for (RcvParameter rcvParameter:select) {
RcvParameterPage rcvParameterPage=new RcvParameterPage();
InvSubinventory invSubinventories = invSubinventoryMapper.findById(rcvParameter.getDefaultReceivingSubinvId());
if(invSubinventories==null){
continue;
}
InvLocator invLocator = invLocatorMapper.findById(rcvParameter.getDefaultReceivingLocatorId());
if(invLocator==null){
continue;
}
rcvParameterPage.setSubinvCode(invSubinventories.getSubinvCode());
rcvParameterPage.setLocatorCode(invLocator.getLocatorCode());
BeanUtils.copyProperties(rcvParameter,rcvParameterPage);
rcvParameterPageList.add(rcvParameterPage);
}
return new Result(true, StatusCode.OK, "接收参数查询成功", rcvParameterPageList);
}
List<RcvParameter> rcvParameters = rcvParameterMapper.selectByInvIdByupdateTime(invId);
for (RcvParameter rcvParameter:rcvParameters) {
RcvParameterPage rcvParameterPage=new RcvParameterPage();
String defaultReceivingSubinvId = rcvParameter.getDefaultReceivingSubinvId();
InvSubinventory invSubinventories = invSubinventoryMapper.findById(rcvParameter.getDefaultReceivingSubinvId());
if(invSubinventories==null){
continue;
}
rcvParameter.getDefaultReceivingLocatorId();
InvLocator invLocator = invLocatorMapper.findById(rcvParameter.getDefaultReceivingLocatorId());
if(invLocator==null){
continue;
}
rcvParameterPage.setSubinvCode(invSubinventories.getSubinvCode());
rcvParameterPage.setLocatorCode(invLocator.getLocatorCode());
BeanUtils.copyProperties(rcvParameter,rcvParameterPage);
rcvParameterPageList.add(rcvParameterPage);
}
return new Result(true, StatusCode.OK, "接收参数查询成功", rcvParameterPageList);
}
}
......@@ -42,6 +42,13 @@ public class TakeStockController {
@Autowired
private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper;
/**
* 通过组织id查询库存信息
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/invInventory/search")
public Result invInventorySearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
......@@ -61,6 +68,14 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invInventories);
}
/**
* 通过库存id查询库区
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/invSubinventory/search")
public Result invSubinventorySearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token);
......@@ -80,6 +95,14 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invSubinventories);
}
/**
* 通过库区id查询货架
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/invLocator/search")
public Result invLocatorSearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token);
......@@ -98,6 +121,13 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invLocators);
}
/**
* 通过扫描码和商品名称查询库存现有量
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/sku/search")
public Result skuSearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token);
......@@ -135,6 +165,24 @@ public class TakeStockController {
return new Result(false,StatusCode.ERROR,"请传入扫描码或是商品名称");
}
/**
* 模糊查询库存现有量
* @param token
* @param request
* @return
* @throws Exception
*/
@GetMapping("/sku/findLikeSku")
public Result findLikeSku(@RequestParam("access_token")String token, @RequestParam String request) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token);
if(StringUtil.isEmpty(request)){
return new Result(false,StatusCode.ERROR,"参数为空");
}
List<InvItemBalanceSummaryV> byLikeAll = invItemBalanceSummaryVMapper.findByLikeAll(request);
return new Result(true,StatusCode.OK,"库存现有量查询成功",byLikeAll);
}
@Autowired
private RedisTemplate redisTemplate;
......@@ -331,7 +379,7 @@ public class TakeStockController {
Date parse = sdf.parse(str);
Calendar cal = Calendar.getInstance();
cal.setTime(parse);
cal.add(Calendar.DATE, 1);//增加一个月
cal.add(Calendar.YEAR, 5);//增加5年
return sdf.format(cal.getTime());
}
......@@ -365,7 +413,6 @@ public class TakeStockController {
}
@PostMapping("/getPMPInvItem")
@Transactional
public Result getPMPInvItem(@RequestParam("access_token")String access_token) {
SysAccessToken sysAccessToken = userServer.checkToken(access_token);
String gettoken = HttpUtilRSA.getToken();
......
......@@ -13,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
import orthopedics.controller.error.ErrorEnum;
import orthopedics.controller.operation.PurOrderHeaderStatusEnum;
import orthopedics.controller.operation.PurOrderLineStatusEnum;
import orthopedics.dao.InvCategoryMapper;
import orthopedics.dao.PurOrderHeaderMapper;
import orthopedics.model.*;
import orthopedics.service.*;
import orthopedics.util.*;
......@@ -45,7 +47,11 @@ public class PurchaseController {
//private final boolean receivableQuantityIncludeRejectsSwitch = false;
@Autowired
private InvCategoryMapper invCategoryMapper;
@Autowired
private PurOrderHeaderMapper purOrderHeaderMapper;
/**
* @param accessToken
......@@ -164,8 +170,9 @@ public class PurchaseController {
object.put("id", UuidUtil.get32UUIDString());
object.put("line_number", String.valueOf(i+1));
String itemCode = object.getString("item_code");
InvItem invItem=null;
if (StringUtil.notEmpty(itemCode)){
InvItem invItem = checkItemCode(inventory.getId(), itemCode);
invItem = checkItemCode(inventory.getId(), itemCode);
object.put("item_id",invItem.getId());
object.put("unit_code",invItem.getPrimaryUnit());
} else {
......@@ -174,16 +181,14 @@ public class PurchaseController {
}
//InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategory(inventory.getId(), itemCode);
InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategoryG(inventory.getId());
String categoryCode = "";
if (invItemCategory != null){
InvCategory invCategory = inventoryServer.selectInvCategoryById(invItemCategory.getCategoryId());
categoryCode = invCategory.getCategoryCode();
} else {
logger.info("inv:" + invCode + "item_code:" + itemCode + "未找到物料分类");
throw ErrorEnum.CategoryError.createException(itemCode);
List<InvCategory> byCategoryCode = invCategoryMapper.findByCategoryCode(invItem.getProType());
String categoryCode=null;
if(byCategoryCode!=null && byCategoryCode.size()>0){
categoryCode = byCategoryCode.get(0).getCategoryCode();
object.put("category_code", categoryCode);
}
object.put("category_code", categoryCode);
String destination = object.getString("destination");
if (StringUtil.isEmpty(destination)){
......@@ -322,7 +327,7 @@ public class PurchaseController {
rcvReceiptHeader.setAttribute10(data.getString("attribute10"));
rcvReceiptHeader.setInvId(inventory.getId());
rcvReceiptHeader.setReceiptType(receiptType);
rcvReceiptHeader.setReceiptNumber(propertiesServer.generateFlowingWater("RCV_BATCH"));
rcvReceiptHeader.setReceiptNumber(propertiesServer.generateFlowingWater("RCV_NUMBER"));
String receiptDate = data.getString("receipt_date");
if (StringUtil.isEmpty(receiptDate)) {
rcvReceiptHeader.setReceiptDate(now);
......@@ -398,6 +403,11 @@ public class PurchaseController {
logger.info("---插入行-----");
purchaseServer.batchInsertRcvReceiptLine(rcvReceiptLineList);
if(headerSourceType.equals("PUR_ORDER_HEADER")){
purOrderHeaderMapper.updateStatusByPurOrderNumber(headerSourceHeaderNumber,"completed");
}
itemInspect(InspectionOrInventoryToolObjects, rcvReceiptHeader, sysUser, now, accessToken);
List<JSONObject> implantsBeforeAccept = itemInspect(InspectionImplantLinesOrContainersObjects, rcvReceiptHeader, sysUser, now,accessToken);
for (JSONObject object : implantsBeforeAccept) {
......@@ -846,8 +856,9 @@ public class PurchaseController {
for (int i = 0; i < lines.size(); i++) {
JSONObject object = lines.getJSONObject(i);
String itemCode = object.getString("item_code");
InvItem invItem=null;
if (StringUtil.notEmpty(itemCode)){
InvItem invItem = checkItemCode(rcvReceiptHeader.getInvId(), itemCode);
invItem = checkItemCode(rcvReceiptHeader.getInvId(), itemCode);
object.put("item_id",invItem.getId());
object.put("unit_code",invItem.getPrimaryUnit());
} else {
......@@ -855,16 +866,13 @@ public class PurchaseController {
throw ErrorEnum.NotAllowToBeEmptyError.createException("item_code");
}
InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategory(rcvReceiptHeader.getInvId(), itemCode);
String categoryCode = "";
if (invItemCategory != null){
InvCategory invCategory = inventoryServer.selectInvCategoryById(invItemCategory.getCategoryId());
categoryCode = invCategory.getCategoryCode();
} else {
logger.info("item_code:" + itemCode + "未找到物料分类");
throw ErrorEnum.CategoryError.createException(itemCode);
List<InvCategory> byCategoryCode = invCategoryMapper.findByCategoryCode(invItem.getProType());
String categoryCode=null;
if(byCategoryCode!=null && byCategoryCode.size()>0){
categoryCode = byCategoryCode.get(0).getCategoryCode();
object.put("category_code", categoryCode);
}
object.put("category_code", categoryCode);
String destination = object.getString("destination");
if (StringUtil.isEmpty(destination)){
......@@ -938,6 +946,7 @@ public class PurchaseController {
}
}
implantOrContainerAccept(InventoryImplantLinesObjects, rcvReceiptHeader, sysUser, now, accessToken);
JSONObject reponseResult = new JSONObject();
ErrorEnum.SUCCESS.putIntoMap(reponseResult);
JSONObject temp = new JSONObject();
......@@ -1167,7 +1176,10 @@ public class PurchaseController {
}
}
}
autoReceiptHeaderStatusCheck(rcvReceiptHeader.getId(), "CLOSED");
//骨仓接收单入库修改状态为已关闭
//书城改为以已入库
// autoReceiptHeaderStatusCheck(rcvReceiptHeader.getId(), "CLOSED");
purchaseServer.updateRcvReceiptHeaderStatusByHeaderId(rcvReceiptHeader.getId(), "ACCEPTED");
}
private void InvItemIn(String accessToken, String rcvReceiptHeaderId,
......@@ -1921,7 +1933,7 @@ public class PurchaseController {
private List<PurOrderHeaderV> getUniquePurOrderHeader(String userName, String userId, String status, String orgId) {
List<PurOrderHeaderV> purOrderHeaderVList = new ArrayList<>();
//由用户创建的头订单,status状态可选
purOrderHeaderVList.addAll(purchaseServer.selectPurOrderHeaderVByUserNameAndStatusG(status));
purOrderHeaderVList.addAll(purchaseServer.selectPurOrderHeaderVByUserNameAndStatus(userName,status));
List<String> orgIdList = getValidOrgIdByUserId(userId);
//如果有orgId,则筛选出orgId的本级以及下级
if (StringUtil.notEmpty(orgId)) {
......@@ -1949,7 +1961,7 @@ public class PurchaseController {
//status和headerId为筛选条件
private List<PurOrderLineV> getUniquePurOrderLine(String userName, String userId, String status, String headerId) {
List<PurOrderLineV> purOrderLineVList = new ArrayList<>();
purOrderLineVList.addAll(purchaseServer.selectPurOrderLineVByUserNameAndStatusAndHeaderIdG(status, headerId));
purOrderLineVList.addAll(purchaseServer.selectPurOrderLineVByUserNameAndStatusAndHeaderId(userName,status, headerId));
List<String> orgIdList = getValidOrgIdByUserId(userId);
if (orgIdList.size() > 0) {
List<String> childOrgIdList = getAllValidChildOrgId(orgIdList);
......
......@@ -98,7 +98,7 @@ public class SaleController {
orgId = checkOrgCode(orgCode);
}
if (StringUtil.notEmpty(saleHeaderStatus)) {
if (!propertiesServer.isDataDictExist("SAL_HEADER_STATUS", saleHeaderStatus)) {
if (!propertiesServer.isDataDictExist("ORDER_STATUS", saleHeaderStatus)) {
throw ErrorEnum.IllegalParamError.createException("sale_header_status", saleHeaderStatus);
}
}
......@@ -153,31 +153,31 @@ public class SaleController {
List<SalOrderLineV> salOrderLineVList = getUniqueLine(sysAccessToken.getUserName(), sysAccessToken.getUserId(),
saleLineStatus, headId);
JSONArray data = new JSONArray();
List<String> filterParam = Arrays.asList(new String[]{"create_by", "update_by",
"create_time", "update_time", "org_id", "item_id"});
PropertyFilter profilter = new PropertyFilter(){
@Override
public boolean apply(Object object, String name, Object value) {
if(filterParam.contains(name)){
return false;
}
return true;
}
};
salOrderLineVList.forEach(v -> {
JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
data.add(o);
});
// JSONArray data = new JSONArray();
//
// List<String> filterParam = Arrays.asList(new String[]{"create_by", "update_by",
// "create_time", "update_time", "org_id", "item_id"});
// PropertyFilter profilter = new PropertyFilter(){
//
// @Override
// public boolean apply(Object object, String name, Object value) {
//
// if(filterParam.contains(name)){
// return false;
// }
// return true;
// }
//
// };
//
// salOrderLineVList.forEach(v -> {
// JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
// data.add(o);
// });
JSONObject responseResult = new JSONObject();
responseResult.put("data", data);
responseResult.put("data", salOrderLineVList);
ErrorEnum.SUCCESS.putIntoMap(responseResult);
logger.info("销售订单行信息查询接口返回结果:" + responseResult.toJSONString());
return responseResult.toJSONString();
......
......@@ -95,7 +95,8 @@ public class ShipController {
});
//数据校验
String invId = checkInvCode(data.getString("inv_code"));
checkInvAccess(invId, sysAccessToken.getUserId());
//用户是否有权限访问仓库
//checkInvAccess(invId, sysAccessToken.getUserId());
String shipmentType = data.getString("shipment_type");
if (!propertiesServer.isDataDictExist("SHIPMENT_TYPE", shipmentType)) {
throw ErrorEnum.IllegalParamError.createException("shipment_type", shipmentType);
......@@ -139,7 +140,7 @@ public class ShipController {
header.setInvId(invId);
header.setShipmentType(shipmentType);
String shipmentNumber = data.getString("shipment_number");
header.setShipmentNumber(StringUtil.notEmpty(shipmentNumber) ? shipmentNumber : propertiesServer.generateFlowingWater("WSH_SHIPMENT_NUMBER"));
header.setShipmentNumber(StringUtil.notEmpty(shipmentNumber) ? shipmentNumber : propertiesServer.generateFlowingWater("WSH_SHIPMENT_ORDER"));
header.setPartyId(StringUtil.notEmpty(partyCode) ? hpPartyV.getId() : null);
header.setPartySiteId(StringUtil.notEmpty(partySiteCode) ? hpPartySiteV.getId() : null);
String shipper = data.getString("shipper");
......@@ -393,29 +394,29 @@ public class ShipController {
List<WshShipmentHeaderV> wshShipmentHeaderVList = shipServer.selectShipHeaderVByInvIds(invIds, invCode, partyCode, partySiteCode,
shipmentNumber, shipmentType, shipmentHeaderStatus);
JSONArray shipmentHeaderArray = new JSONArray();
List<String> filterParam = Arrays.asList(new String[]{"id", "create_by", "update_by",
"create_time", "update_time", "org_id","inv_id", "item_id","party_id","party_site_id"});
PropertyFilter profilter = new PropertyFilter(){
@Override
public boolean apply(Object object, String name, Object value) {
if(filterParam.contains(name)){
return false;
}
return true;
}
};
// JSONArray shipmentHeaderArray = new JSONArray();
//
// List<String> filterParam = Arrays.asList(new String[]{"id", "create_by", "update_by",
// "create_time", "update_time", "org_id","inv_id", "item_id","party_id","party_site_id"});
// PropertyFilter profilter = new PropertyFilter(){
// @Override
// public boolean apply(Object object, String name, Object value) {
//
// if(filterParam.contains(name)){
// return false;
// }
// return true;
// }
// };
wshShipmentHeaderVList.forEach(v -> {
JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
shipmentHeaderArray.add(o);
});
// wshShipmentHeaderVList.forEach(v -> {
// JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
// shipmentHeaderArray.add(o);
// });
JSONObject responseResult = new JSONObject();
JSONObject responseData = new JSONObject();
responseData.put("shipment_headers", shipmentHeaderArray);
responseData.put("shipment_headers", wshShipmentHeaderVList);
responseResult.put("data", responseData);
ErrorEnum.SUCCESS.putIntoMap(responseResult);
logger.info("发运事务头查询接口返回结果:" + responseResult.toJSONString());
......@@ -443,36 +444,36 @@ public class ShipController {
}
List<WshShipmentLineV> wshShipmentLineVList = shipServer.selectShipmentLineByInvId(invIds, shipmentNumber, shipmentLineStatus);
List<String> filterParam = Arrays.asList(new String[]{"id", "create_by", "update_by",
"create_time", "update_time", "inv_id","subinv_id","locator_id", "item_id","stage_inv_id","stage_subinv_id","stage_locator_id"});
PropertyFilter profilter = new PropertyFilter(){
@Override
public boolean apply(Object object, String name, Object value) {
if(filterParam.contains(name)){
return false;
}
return true;
}
};
wshShipmentLineVList.forEach(v -> {
JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
Map<String, Object> category = shipServer.selectCategory(v.getId());
if (category != null) {
o.put("category_code", category.get("category_code"));
o.put("category_name", category.get("category_name"));
o.put("category_desc", category.get("category_desc"));
}else {
logger.info(String.format("%s的物料%s没有配置类别",v.getInvCode(), v.getItemCode()));
}
lines.add(o);
});
// List<String> filterParam = Arrays.asList(new String[]{"id", "create_by", "update_by",
// "create_time", "update_time", "inv_id","subinv_id","locator_id", "item_id","stage_inv_id","stage_subinv_id","stage_locator_id"});
// PropertyFilter profilter = new PropertyFilter(){
// @Override
// public boolean apply(Object object, String name, Object value) {
//
// if(filterParam.contains(name)){
// return false;
// }
// return true;
// }
// };
// wshShipmentLineVList.forEach(v -> {
// JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
// Map<String, Object> category = shipServer.selectCategory(v.getId());
// if (category != null) {
// o.put("category_code", category.get("category_code"));
// o.put("category_name", category.get("category_name"));
// o.put("category_desc", category.get("category_desc"));
// }else {
// logger.info(String.format("%s的物料%s没有配置类别",v.getInvCode(), v.getItemCode()));
// }
// lines.add(o);
// });
JSONObject responseResult = new JSONObject();
JSONObject responseData = new JSONObject();
responseData.put("shipment_number", shipmentNumber);
responseData.put("wsh_shipment_lines", lines);
responseData.put("wsh_shipment_lines", wshShipmentLineVList);
responseResult.put("data", responseData);
ErrorEnum.SUCCESS.putIntoMap(responseResult);
logger.info("发运事务行查询接口返回结果:" + responseResult.toJSONString());
......
......@@ -158,7 +158,7 @@ public class UserController {
Map<String, Object> organizationInfo = organzitionServer.selectByUserId(user.getId());
if (organizationInfo == null) {
logger.info("用户未分配组织");
//throw ErrorEnum.IllegalParamError.createException("userId", user.getId());
throw ErrorEnum.IllegalParamError.createException("userId", user.getId());
}
//产生结果
JSONObject reponseResult = new JSONObject();
......
......@@ -68,4 +68,19 @@ InvCountHeader selectInvCountHeaderById(@Param("id") String id);
//修改状态
@Update("update inv_count_header set header_status = #{status} where id = #{id}")
int updateInvCountHeaderStatus(@Param("status") String status, @Param("id") String id);
//修改更新人和更新时间
@Update("update inv_count_header set update_by = #{createBy} , update_time = #{updateTime} where id = #{id}")
int editCreateByAndUpdateTime(@Param("createBy") String createBy, @Param("updateTime") String updateTime);
//根据sysOrgCode查询
@Select("select * from inv_count_header where sys_org_code = #{sysOrgCode}")
@ResultMap("invcountheader")
public List<InvCountHeader> fingBySysOrgCode(@Param("sysOrgCode") String sysOrgCode);
//根据sysOrgCode查询
@Select("select * from inv_count_header where count_number = #{countNumber}")
@ResultMap("invcountheader")
public InvCountHeader fingByCountNumber(@Param("countNumber") String countNumber);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.*;
import orthopedics.model.InvCountLine;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
/**
* @author ice
*/
......@@ -73,4 +70,13 @@ Integer insert(InvCountLine InvCountLine);
@Select("select * from inv_count_line where inv_count_header_id = #{id}")
@ResultMap("invcountline")
List<InvCountLine> selectByInvCountHeaderId(@Param("id") String id);
//根据itemId查询
@Select("select * from inv_count_line where item_id = #{itemId}")
@ResultMap("invcountline")
InvCountLine findByItemId(@Param("itemId") String itemId);
//修改更新人和更新时间和different_quantity、attribute2
@Update("update inv_count_line set update_by = #{createBy},update_time = #{updateTime},different_quantity = #{differentQuantity},attribute2 = #{attribute2} where id = #{id}")
int editCreateByAndUpdateTime(@Param("id") String id,@Param("createBy") String createBy, @Param("updateTime") String updateTime, @Param("differentQuantity") int differentQuantity, @Param("attribute2") String attribute2);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.InvCountPrintLine;
/**
* @author author
*/
public interface InvCountPrintLineMapper{
@Select("SELECT * FROM inv_count_print_line")
@Results(id = "invcountprintline", value ={
@Result(property = "id", column = "id"),
@Result(property = "createBy", column = "create_by"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"),
@Result(property = "sysOrgCode", column = "sys_org_code"),
@Result(property = "attributeCategory", column = "attribute_category"),
@Result(property = "attribute1", column = "attribute1"),
@Result(property = "attribute2", column = "attribute2"),
@Result(property = "attribute3", column = "attribute3"),
@Result(property = "attribute4", column = "attribute4"),
@Result(property = "attribute5", column = "attribute5"),
@Result(property = "attribute6", column = "attribute6"),
@Result(property = "attribute7", column = "attribute7"),
@Result(property = "attribute8", column = "attribute8"),
@Result(property = "attribute9", column = "attribute9"),
@Result(property = "attribute10", column = "attribute10"),
@Result(property = "printId", column = "print_id"),
@Result(property = "sourceType", column = "source_type"),
@Result(property = "sourceHeaderId", column = "source_header_id"),
@Result(property = "sourceHeaderNumber", column = "source_header_number"),
@Result(property = "sourceLineId", column = "source_line_id"),
@Result(property = "sourceLineNumber", column = "source_line_number"),
@Result(property = "compare", column = "compare"),
@Result(property = "logic", column = "logic"),
@Result(property = "comparisonValues", column = "comparison_values"),
@Result(property = "fields", column = "fields"),
})
public List<InvCountPrintLine> select();
@Insert("<script>" +
"INSERT INTO inv_count_print_line(id,create_by,create_time,update_by,update_time,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,print_id,source_type,source_header_id,source_header_number,source_line_id,source_line_number,compare,logic,comparison_values,fields) VALUES" +
"<foreach collection='invcountprintlines' item='item' index='index' separator=','>" +
"(#{item.id},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.sysOrgCode},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10},#{item.printId},#{item.sourceType},#{item.sourceHeaderId},#{item.sourceHeaderNumber},#{item.sourceLineId},#{item.sourceLineNumber},#{item.compare},#{item.logic},#{item.comparisonValues},#{item.fields})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("invcountprintlines") List<InvCountPrintLine> InvCountPrintLineList);
@Insert(
"INSERT INTO inv_count_print_line(id,create_by,create_time,update_by,update_time,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,print_id,source_type,source_header_id,source_header_number,source_line_id,source_line_number,compare,logic,comparison_values,fields) VALUES" +
"(#{id},#{createBy},#{createTime},#{updateBy},#{updateTime},#{sysOrgCode},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10},#{printId},#{sourceType},#{sourceHeaderId},#{sourceHeaderNumber},#{sourceLineId},#{sourceLineNumber},#{compare},#{logic},#{comparisonValues},#{fields})"
)
Integer insert(InvCountPrintLine InvCountPrintLine);
//通过头id查询
@Select("SELECT * FROM inv_count_print_line WHERE print_id = #{printId} ")
@ResultMap("invcountprintline")
List<InvCountPrintLine> findByPrintId(@Param("printId")String printId);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.InvCountPrint;
/**
* @author author
*/
public interface InvCountPrintMapper{
@Select("SELECT * FROM inv_count_print")
@Results(id = "invcountprint", value ={
@Result(property = "id", column = "id"),
@Result(property = "sysOrgCode", column = "sys_org_code"),
@Result(property = "attributeCategory", column = "attribute_category"),
@Result(property = "attribute1", column = "attribute1"),
@Result(property = "attribute2", column = "attribute2"),
@Result(property = "attribute3", column = "attribute3"),
@Result(property = "attribute4", column = "attribute4"),
@Result(property = "attribute5", column = "attribute5"),
@Result(property = "attribute6", column = "attribute6"),
@Result(property = "attribute7", column = "attribute7"),
@Result(property = "attribute8", column = "attribute8"),
@Result(property = "orgId", column = "org_id"),
@Result(property = "attribute9", column = "attribute9"),
@Result(property = "attribute10", column = "attribute10"),
@Result(property = "printType", column = "print_type"),
@Result(property = "printNumber", column = "print_number"),
@Result(property = "printName", column = "print_name"),
@Result(property = "printInvId", column = "print_inv_id"),
@Result(property = "printDate", column = "print_date"),
@Result(property = "remark", column = "remark"),
@Result(property = "sourceType", column = "source_type"),
@Result(property = "sourceHeaderId", column = "source_header_id"),
@Result(property = "sourceHeaderNumber", column = "source_header_number"),
@Result(property = "sourceLineId", column = "source_line_id"),
@Result(property = "sourceLineNumber", column = "source_line_number"),
@Result(property = "createBy", column = "create_by"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"),
})
public List<InvCountPrint> select();
@Insert("<script>" +
"INSERT INTO inv_count_print(id,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,org_id,attribute9,attribute10,print_type,print_number,print_name,print_inv_id,print_date,remark,source_type,source_header_id,source_header_number,source_line_id,source_line_number,create_by,create_time,update_by,update_time) VALUES" +
"<foreach collection='invcountprints' item='item' index='index' separator=','>" +
"(#{item.id},#{item.sysOrgCode},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.orgId},#{item.attribute9},#{item.attribute10},#{item.printType},#{item.printNumber},#{item.printName},#{item.printInvId},#{item.printDate},#{item.remark},#{item.sourceType},#{item.sourceHeaderId},#{item.sourceHeaderNumber},#{item.sourceLineId},#{item.sourceLineNumber},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("invcountprints") List<InvCountPrint> InvCountPrintList);
@Insert(
"INSERT INTO inv_count_print(id,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,org_id,attribute9,attribute10,print_type,print_number,print_name,print_inv_id,print_date,remark,source_type,source_header_id,source_header_number,source_line_id,source_line_number,create_by,create_time,update_by,update_time) VALUES" +
"(#{id},#{sysOrgCode},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{orgId},#{attribute9},#{attribute10},#{printType},#{printNumber},#{printName},#{printInvId},#{printDate},#{remark},#{sourceType},#{sourceHeaderId},#{sourceHeaderNumber},#{sourceLineId},#{sourceLineNumber},#{createBy},#{createTime},#{updateBy},#{updateTime})"
)
Integer insert(InvCountPrint InvCountPrint);
//通过组织id查询
@Select("SELECT * FROM inv_count_print WHERE org_id = #{orgId} ")
@ResultMap("invcountprint")
List<InvCountPrint> findByOrgId(@Param("orgId")String orgId);
//通过组织id查询
@Select("SELECT * FROM inv_count_print WHERE print_number = #{printNumber} ")
@ResultMap("invcountprint")
InvCountPrint findByPrintNumber(@Param("printNumber")String printNumber);
}
\ No newline at end of file
......@@ -75,4 +75,12 @@ Integer insert(InvInventory InvInventory);
@Select("SELECT * FROM inv_inventory WHERE org_id = #{orgId} and status = 'A'")
@ResultMap("invinventory")
List<InvInventory> selectByOrgId(@Param("orgId") String orgId);
@Select("SELECT * FROM inv_inventory WHERE inv_code = #{InvCode}")
@ResultMap("invinventory")
InvInventory findByInvCode(@Param("InvCode") String InvCode);
@Select("SELECT * FROM inv_inventory WHERE sortid = #{sortid}")
@ResultMap("invinventory")
InvInventory findBySortid(@Param("sortid") String sortid);
}
\ No newline at end of file
......@@ -27,6 +27,34 @@ public interface InvItemBalanceSummaryVMapper{
@Result(property = "subinv_name", column = "subinv_name"),
@Result(property = "locator_code", column = "locator_code"),
@Result(property = "locator_name", column = "locator_name"),
@Result(property = "attribute1", column = "attribute1"),
@Result(property = "attribute2", column = "attribute2"),
@Result(property = "attribute3", column = "attribute3"),
@Result(property = "attribute4", column = "attribute4"),
@Result(property = "attribute5", column = "attribute5"),
@Result(property = "pystype", column = "pystype"),
@Result(property = "media", column = "media"),
@Result(property = "isbn", column = "isbn"),
@Result(property = "plucode", column = "plucode"),
@Result(property = "extcode", column = "extcode"),
@Result(property = "general_name", column = "general_name"),
@Result(property = "cip", column = "cip"),
@Result(property = "manufacturer_id", column = "manufacturer_id"),
@Result(property = "image_url", column = "image_url"),
@Result(property = "pack_qty", column = "pack_qty"),
@Result(property = "pack_unit", column = "pack_unit"),
@Result(property = "tax", column = "tax"),
@Result(property = "isset", column = "isset"),
@Result(property = "org_id", column = "org_id"),
@Result(property = "create_by", column = "create_by"),
@Result(property = "create_time", column = "create_time"),
@Result(property = "update_by", column = "update_by"),
@Result(property = "update_time", column = "update_time"),
@Result(property = "pro_type", column = "pro_type"),
@Result(property = "is_borrow", column = "is_borrow"),
@Result(property = "rfid", column = "rfid"),
@Result(property = "language", column = "language"),
@Result(property = "marketing_status", column = "marketing_status"),
@Result(property = "item_code", column = "item_code"),
@Result(property = "scancode", column = "scancode"),
@Result(property = "purchase_price", column = "purchase_price"),
......@@ -41,16 +69,16 @@ public interface InvItemBalanceSummaryVMapper{
public List<InvItemBalanceSummaryV> select();
@Insert("<script>" +
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES" +
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,attribute1,attribute2,attribute3,attribute4,attribute5,pystype,media,isbn,plucode,extcode,general_name,cip,manufacturer_id,image_url,pack_qty,pack_unit,tax,isset,org_id,create_by,create_time,update_by,update_time,pro_type,is_borrow,rfid,language,marketing_status,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES" +
"<foreach collection='invitembalancesummaryvs' item='item' index='index' separator=','>" +
"(#{item.inv_id},#{item.subinv_id},#{item.locator_id},#{item.item_id},#{item.balance},#{item.inv_code},#{item.inv_name},#{item.subinv_code},#{item.subinv_name},#{item.locator_code},#{item.locator_name},#{item.item_code},#{item.scancode},#{item.purchase_price},#{item.item_name},#{item.item_desc},#{item.max_inv_qty},#{item.min_inv_qty},#{item.specification},#{item.unit_code},#{item.unit_name})" +
"(#{item.inv_id},#{item.subinv_id},#{item.locator_id},#{item.item_id},#{item.balance},#{item.inv_code},#{item.inv_name},#{item.subinv_code},#{item.subinv_name},#{item.locator_code},#{item.locator_name},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.pystype},#{item.media},#{item.isbn},#{item.plucode},#{item.extcode},#{item.general_name},#{item.cip},#{item.manufacturer_id},#{item.image_url},#{item.pack_qty},#{item.pack_unit},#{item.tax},#{item.isset},#{item.org_id},#{item.create_by},#{item.create_time},#{item.update_by},#{item.update_time},#{item.pro_type},#{item.is_borrow},#{item.rfid},#{item.language},#{item.marketing_status},#{item.item_code},#{item.scancode},#{item.purchase_price},#{item.item_name},#{item.item_desc},#{item.max_inv_qty},#{item.min_inv_qty},#{item.specification},#{item.unit_code},#{item.unit_name})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("invitembalancesummaryvs")List<InvItemBalanceSummaryV> InvItemBalanceSummaryVList);
@Insert(
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES" +
"(#{inv_id},#{subinv_id},#{locator_id},#{item_id},#{balance},#{inv_code},#{inv_name},#{subinv_code},#{subinv_name},#{locator_code},#{locator_name},#{item_code},#{scancode},#{purchase_price},#{item_name},#{item_desc},#{max_inv_qty},#{min_inv_qty},#{specification},#{unit_code},#{unit_name})"
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,attribute1,attribute2,attribute3,attribute4,attribute5,pystype,media,isbn,plucode,extcode,general_name,cip,manufacturer_id,image_url,pack_qty,pack_unit,tax,isset,org_id,create_by,create_time,update_by,update_time,pro_type,is_borrow,rfid,language,marketing_status,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES" +
"(#{inv_id},#{subinv_id},#{locator_id},#{item_id},#{balance},#{inv_code},#{inv_name},#{subinv_code},#{subinv_name},#{locator_code},#{locator_name},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{pystype},#{media},#{isbn},#{plucode},#{extcode},#{general_name},#{cip},#{manufacturer_id},#{image_url},#{pack_qty},#{pack_unit},#{tax},#{isset},#{org_id},#{create_by},#{create_time},#{update_by},#{update_time},#{pro_type},#{is_borrow},#{rfid},#{language},#{marketing_status},#{item_code},#{scancode},#{purchase_price},#{item_name},#{item_desc},#{max_inv_qty},#{min_inv_qty},#{specification},#{unit_code},#{unit_name})"
)
Integer insert(InvItemBalanceSummaryV InvItemBalanceSummaryV);
......@@ -74,4 +102,30 @@ public interface InvItemBalanceSummaryVMapper{
@Select("SELECT * FROM inv_item_balance_summary_v WHERE item_id = #{item_id}")
@ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV> selectByItemId(@Param("item_id") String item_id);
@Select("SELECT * FROM inv_item_balance_summary_v WHERE attribute2 = 'A'")
@ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV> findByAttribute2();
@Select("SELECT * FROM inv_item_balance_summary_v WHERE inv_code LIKE '%${request}%' OR inv_name LIKE '%${request}%' OR subinv_code LIKE '%${request}%' OR subinv_name LIKE '%${request}%' OR locator_code LIKE '%${request}%' OR locator_name LIKE '%${request}%' OR plucode LIKE '%${request}%' OR scancode LIKE '%${request}%' OR rfid LIKE '%${request}%' OR item_code LIKE '%${request}%' OR item_name LIKE '%${request}%'")
@ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV> findByLikeAll(@Param("request") String request);
@Select("SELECT * FROM inv_item_balance_summary_v WHERE ${sql}")
@ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV> findBySql(@Param("sql") String sql);
//@Select("SELECT * FROM inv_item_balance_summary_v WHERE inv_id = #{inv_id} and subinv_id = #{subinv_id} and locator_id = #{locator_id} and item_id = #{item_id}")
@Select({"<script>",
"SELECT * FROM inv_item_balance_summary_v WHERE 1=1 " +
"<if test = 'inv_id != null'>and inv_id = #{inv_id}</if>"+
"<if test = 'subinv_id != null'>and subinv_id = #{subinv_id}</if>"+
"<if test = 'locator_id != null'>and locator_id = #{locator_id}</if>"+
"<if test = 'item_id != null'>and item_id = #{item_id}</if>",
"</script>"})
@ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV> findByInvIdAndSubinvIdAndLocatorIdAndItemId(@Param("inv_id") String inv_id,@Param("subinv_id") String subinv_id,@Param("locator_id") String locator_id,@Param("item_id") String item_id);
}
\ No newline at end of file
......@@ -124,4 +124,19 @@ public interface InvItemMapper{
@Delete("DELETE FROM inv_item WHERE plucode = #{plucode}")
int deleteByPlucode( @Param("plucode") String plucode);
@Select("SELECT * FROM inv_item WHERE attribute2 !='A' AND (attribute6 IS NULL OR attribute6=0)")
@ResultMap("invitem")
List<InvItem> findByAttribute2AndAttribute6();
@Select("SELECT * FROM inv_item WHERE attribute2 !='A' AND attribute6=1")
@ResultMap("invitem")
List<InvItem> findByAttribute2();
@Update("UPDATE inv_item SET attribute6 = #{attribute6} where id = #{id}")
int updateByAttribute6(@Param("id") String id,@Param("attribute6") String attribute6);
@Select("SELECT * FROM inv_item WHERE plucode = #{plucode}")
@ResultMap("invitem")
InvItem findByPlucode(@Param("plucode") String plucode);
}
\ No newline at end of file
......@@ -37,6 +37,20 @@ public interface InvLocatorMapper{
})
public List<InvLocator> selectById(@Param("id")String id);
@Insert("<script>" +
"INSERT INTO inv_locator(id,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_id,locator_code,locator_name,locator_desc,status,create_by,create_time,update_by,update_time) VALUES" +
"<foreach collection='invlocators' item='item' index='index' separator=','>" +
"(#{item.id},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10},#{item.invId},#{item.subinvId},#{item.locatorCode},#{item.locatorName},#{item.locatorDesc},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("invlocators")List<InvLocator> InvLocatorList);
@Insert(
"INSERT INTO inv_locator(id,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_id,locator_code,locator_name,locator_desc,status,create_by,create_time,update_by,update_time) VALUES" +
"(#{id},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10},#{invId},#{subinvId},#{locatorCode},#{locatorName},#{locatorDesc},#{status},#{createBy},#{createTime},#{updateBy},#{updateTime})"
)
Integer insert(InvLocator InvLocator);
@Select("SELECT * FROM inv_locator WHERE inv_id=#{invId} AND subinv_id=#{subInvId} AND locator_code=#{locatorCode} AND status='A'")
@ResultMap("invlocator")
List<InvLocator> selectByLocatorCode(@Param("invId")String invId, @Param("subInvId")String subInvId, @Param("locatorCode")String locatorCode);
......@@ -53,4 +67,12 @@ public interface InvLocatorMapper{
@ResultMap("invlocator")
List<InvLocator> selectLocatorByCode(@Param("locatorCode")String locatorCode);
@Select("SELECT * FROM inv_locator WHERE inv_id=#{invId} AND subinv_id=#{subInvId} AND status='A'")
@ResultMap("invlocator")
List<InvLocator> findByInvIdAndSubinvId(@Param("invId")String invId, @Param("subInvId")String subInvId);
@Select("SELECT * FROM inv_locator WHERE id = #{id}")
@ResultMap("invlocator")
InvLocator findById(@Param("id")String id);
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ public interface InvSubinventoryMapper{
@Results(id = "invsubinventory", value ={
@Result(property = "id", column = "id"),
@Result(property = "createBy", column = "create_by"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "createDate", column = "create_date"),
@Result(property = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"),
@Result(property = "attributeCategory", column = "attribute_category"),
......@@ -38,6 +38,20 @@ public interface InvSubinventoryMapper{
})
public List<InvSubinventory> selectById(@Param("id")String id);
@Insert("<script>" +
"INSERT INTO inv_subinventory(id,create_by,create_date,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_type,subinv_code,subinv_name,subinv_desc,locator_control,status) VALUES" +
"<foreach collection='invsubinventorys' item='item' index='index' separator=','>" +
"(#{item.id},#{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateTime},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10},#{item.invId},#{item.subinvType},#{item.subinvCode},#{item.subinvName},#{item.subinvDesc},#{item.locatorControl},#{item.status})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("invsubinventorys")List<InvSubinventory> InvSubinventoryList);
@Insert(
"INSERT INTO inv_subinventory(id,create_by,create_date,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_type,subinv_code,subinv_name,subinv_desc,locator_control,status) VALUES" +
"(#{id},#{createBy},#{createDate},#{updateBy},#{updateTime},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10},#{invId},#{subinvType},#{subinvCode},#{subinvName},#{subinvDesc},#{locatorControl},#{status})"
)
Integer insert(InvSubinventory InvSubinventory);
@Select("SELECT * FROM inv_subinventory WHERE inv_id = #{invId} AND subinv_code = #{subInvCode} AND status = 'A'")
@ResultMap("invsubinventory")
public List<InvSubinventory> selectSubInvIdByCode(@Param("invId")String invId, @Param("subInvCode")String subInvCode);
......@@ -50,4 +64,17 @@ public interface InvSubinventoryMapper{
@ResultMap("invsubinventory")
public List<InvSubinventory> select();
@Select("SELECT * FROM inv_subinventory WHERE inv_id = #{invId}AND subinv_name = '存储区' AND status = 'A'")
@ResultMap("invsubinventory")
public List<InvSubinventory> selectByInvIdAndSubinvName(@Param("invId")String invId);
@Select("SELECT * FROM inv_subinventory WHERE id = #{id}")
@ResultMap("invsubinventory")
InvSubinventory findById(@Param("id") String id);
@Select("SELECT * FROM inv_subinventory WHERE subinv_code = #{subinvCode}")
@ResultMap("invsubinventory")
InvSubinventory findBySubinvCode(@Param("subinvCode") String subinvCode);
}
\ No newline at end of file
......@@ -19,9 +19,10 @@ public interface SalOrderLineVMapper{
@Results(id = "salorderlinev", value ={
@Result(property = "orgCode", column = "org_code"),
@Result(property = "orgName", column = "org_name"),
@Result(property = "itemType", column = "item_type"),
@Result(property = "plucode", column = "plucode"),
@Result(property = "invId", column = "inv_id"),
@Result(property = "itemCode", column = "item_code"),
@Result(property = "itemName", column = "item_name"),
@Result(property = "shippableQuantity", column = "shippable_quantity"),
@Result(property = "lineStatusName", column = "line_status_name"),
@Result(property = "sourceTypeName", column = "source_type_name"),
@Result(property = "id", column = "id"),
......@@ -41,6 +42,7 @@ public interface SalOrderLineVMapper{
@Result(property = "orgId", column = "org_id"),
@Result(property = "salOrderHeaderId", column = "sal_order_header_id"),
@Result(property = "lineNumber", column = "line_number"),
@Result(property = "itemName", column = "item_name"),
@Result(property = "itemId", column = "item_id"),
@Result(property = "quantity", column = "quantity"),
@Result(property = "unitCode", column = "unit_code"),
......@@ -59,7 +61,11 @@ public interface SalOrderLineVMapper{
@Result(property = "createTime", column = "create_time"),
@Result(property = "pricingDate", column = "pricing_date"),
@Result(property = "updateTime", column = "update_time"),
@Result(property = "orderHeaderId", column = "order_header_id"),
@Result(property = "sourceHeaderNumber", column = "source_header_number"),
@Result(property = "orderNumber", column = "order_number"),
@Result(property = "orderDate", column = "order_date"),
@Result(property = "sellerId", column = "seller_id"),
})
public List<SalOrderLineV> select();
......@@ -69,7 +75,7 @@ public interface SalOrderLineVMapper{
+ " AND line_status = #{salLineStatus}"
+ "</if>"
+ "<if test = 'salHeaderId != null and salHeaderId != \"\"'>"
+ " AND sal_order_header_id = #{salHeaderId}"
+ " AND order_header_id = #{salHeaderId}"
+ "</if>"
+ "</script>")
@ResultMap("salorderlinev")
......@@ -99,16 +105,20 @@ public interface SalOrderLineVMapper{
@Insert("<script>" +
"INSERT INTO sal_order_line_v(org_code,org_name,item_code,item_name,shippable_quantity,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,source_header_number) VALUES" +
"<foreach collection='salorderlinevs' item='item' index='index' separator=','>" +
"(#{item.orgCode},#{item.orgName},#{item.itemCode},#{item.itemName},#{item.shippableQuantity},#{item.lineStatusName},#{item.sourceTypeName},#{item.id},#{item.createBy},#{item.updateBy},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10},#{item.orgId},#{item.salOrderHeaderId},#{item.lineNumber},#{item.itemId},#{item.quantity},#{item.unitCode},#{item.listPrice},#{item.salePrice},#{item.taxRate},#{item.requiredDate},#{item.lineRemark},#{item.sourceType},#{item.sourceHeaderId},#{item.sourceLineId},#{item.lineStatus},#{item.shippingDate},#{item.sysOrgCode},#{item.sourceLineNumber},#{item.createTime},#{item.pricingDate},#{item.updateTime},#{item.sourceHeaderNumber})" +
"</foreach>" +
"</script>")
"INSERT INTO sal_order_line_v(org_code,org_name,item_type,plucode,inv_id,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_name,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,order_header_id,source_header_number,order_number,order_date,seller_id) VALUES" +
"<foreach collection='salorderlinevs' item='item' index='index' separator=','>" +
"(#{item.orgCode},#{item.orgName},#{item.itemType},#{item.plucode},#{item.invId},#{item.lineStatusName},#{item.sourceTypeName},#{item.id},#{item.createBy},#{item.updateBy},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10},#{item.orgId},#{item.salOrderHeaderId},#{item.lineNumber},#{item.itemName},#{item.itemId},#{item.quantity},#{item.unitCode},#{item.listPrice},#{item.salePrice},#{item.taxRate},#{item.requiredDate},#{item.lineRemark},#{item.sourceType},#{item.sourceHeaderId},#{item.sourceLineId},#{item.lineStatus},#{item.shippingDate},#{item.sysOrgCode},#{item.sourceLineNumber},#{item.createTime},#{item.pricingDate},#{item.updateTime},#{item.orderHeaderId},#{item.sourceHeaderNumber},#{item.orderNumber},#{item.orderDate},#{item.sellerId})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("salorderlinevs")List<SalOrderLineV> SalOrderLineVList);
@Insert(
"INSERT INTO sal_order_line_v(org_code,org_name,item_code,item_name,shippable_quantity,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,source_header_number) VALUES" +
"(#{orgCode},#{orgName},#{itemCode},#{itemName},#{shippableQuantity},#{lineStatusName},#{sourceTypeName},#{id},#{createBy},#{updateBy},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10},#{orgId},#{salOrderHeaderId},#{lineNumber},#{itemId},#{quantity},#{unitCode},#{listPrice},#{salePrice},#{taxRate},#{requiredDate},#{lineRemark},#{sourceType},#{sourceHeaderId},#{sourceLineId},#{lineStatus},#{shippingDate},#{sysOrgCode},#{sourceLineNumber},#{createTime},#{pricingDate},#{updateTime},#{sourceHeaderNumber})"
"INSERT INTO sal_order_line_v(org_code,org_name,item_type,plucode,inv_id,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_name,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,order_header_id,source_header_number,order_number,order_date,seller_id) VALUES" +
"(#{orgCode},#{orgName},#{itemType},#{plucode},#{invId},#{lineStatusName},#{sourceTypeName},#{id},#{createBy},#{updateBy},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10},#{orgId},#{salOrderHeaderId},#{lineNumber},#{itemName},#{itemId},#{quantity},#{unitCode},#{listPrice},#{salePrice},#{taxRate},#{requiredDate},#{lineRemark},#{sourceType},#{sourceHeaderId},#{sourceLineId},#{lineStatus},#{shippingDate},#{sysOrgCode},#{sourceLineNumber},#{createTime},#{pricingDate},#{updateTime},#{orderHeaderId},#{sourceHeaderNumber},#{orderNumber},#{orderDate},#{sellerId})"
)
Integer insert(SalOrderLineV SalOrderLineV);
@Select("SELECT * FROM sal_order_line_v WHERE line_status='completed' AND attribute6 IS NULL AND item_type='A'")
@ResultMap("salorderlinev")
public List<SalOrderLineV> findByPMP();
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.SysDictItem;
/**
* @author author
*/
public interface SysDictItemMapper{
@Select("SELECT * FROM sys_dict_item")
@Results(id = "sysdictitem", value ={
@Result(property = "id", column = "id"),
@Result(property = "dictId", column = "dict_id"),
@Result(property = "itemText", column = "item_text"),
@Result(property = "itemValue", column = "item_value"),
@Result(property = "description", column = "description"),
@Result(property = "sortOrder", column = "sort_order"),
@Result(property = "status", column = "status"),
@Result(property = "createBy", column = "create_by"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"),
})
public List<SysDictItem> select();
@Insert("<script>" +
"INSERT INTO sys_dict_item(id,dict_id,item_text,item_value,description,sort_order,status,create_by,create_time,update_by,update_time) VALUES" +
"<foreach collection='sysdictitems' item='item' index='index' separator=','>" +
"(#{item.id},#{item.dictId},#{item.itemText},#{item.itemValue},#{item.description},#{item.sortOrder},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("sysdictitems") List<SysDictItem> SysDictItemList);
@Insert(
"INSERT INTO sys_dict_item(id,dict_id,item_text,item_value,description,sort_order,status,create_by,create_time,update_by,update_time) VALUES" +
"(#{id},#{dictId},#{itemText},#{itemValue},#{description},#{sortOrder},#{status},#{createBy},#{createTime},#{updateBy},#{updateTime})"
)
Integer insert(SysDictItem SysDictItem);
@Select("SELECT * FROM sys_dict_item where item_value=#{itemValue}")
@ResultMap("sysdictitem")
SysDictItem findByItemValue(@Param("itemValue") String itemValue);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.TempAreaFomPmp;
/**
* @author author
*/
public interface TempAreaFomPmpMapper{
@Select("SELECT * FROM temp_area_fom_pmp")
@Results(id = "tempareafompmp", value ={
@Result(property = "id", column = "id"),
@Result(property = "wh", column = "wh"),
@Result(property = "subwh", column = "subwh"),
@Result(property = "descript", column = "descript"),
})
public List<TempAreaFomPmp> select();
@Insert("<script>" +
"INSERT INTO temp_area_fom_pmp(id,wh,subwh,descript) VALUES" +
"<foreach collection='tempareafompmps' item='item' index='index' separator=','>" +
"(#{item.id},#{item.wh},#{item.subwh},#{item.descript})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("tempareafompmps") List<TempAreaFomPmp> TempAreaFomPmpList);
@Insert(
"INSERT INTO temp_area_fom_pmp(id,wh,subwh,descript) VALUES" +
"(#{id},#{wh},#{subwh},#{descript})"
)
Integer insert(TempAreaFomPmp TempAreaFomPmp);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.TempInventoryFomPmp;
/**
* @author author
*/
public interface TempInventoryFomPmpMapper{
@Select("SELECT * FROM temp_inventory_fom_pmp")
@Results(id = "tempinventoryfompmp", value ={
@Result(property = "id", column = "id"),
@Result(property = "code", column = "code"),
@Result(property = "descript", column = "descript"),
})
public List<TempInventoryFomPmp> select();
@Insert("<script>" +
"INSERT INTO temp_inventory_fom_pmp(id,code,descript) VALUES" +
"<foreach collection='tempinventoryfompmps' item='item' index='index' separator=','>" +
"(#{item.id},#{item.code},#{item.descript})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("tempinventoryfompmps") List<TempInventoryFomPmp> TempInventoryFomPmpList);
@Insert(
"INSERT INTO temp_inventory_fom_pmp(id,code,descript) VALUES" +
"(#{id},#{code},#{descript})"
)
Integer insert(TempInventoryFomPmp TempInventoryFomPmp);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.TempItemFomPmp;
/**
* @author author
*/
public interface TempItemFomPmpMapper{
@Select("SELECT * FROM temp_item_fom_pmp")
@Results(id = "tempitemfompmp", value ={
@Result(property = "id", column = "id"),
@Result(property = "plucode", column = "plucode"),
@Result(property = "pystype", column = "pystype"),
@Result(property = "isbn", column = "isbn"),
@Result(property = "scancode", column = "scancode"),
@Result(property = "title", column = "title"),
@Result(property = "jp", column = "jp"),
@Result(property = "price", column = "price"),
@Result(property = "clscode", column = "clscode"),
@Result(property = "clsname", column = "clsname"),
@Result(property = "publisher", column = "publisher"),
@Result(property = "pubname", column = "pubname"),
@Result(property = "pubdate", column = "pubdate"),
@Result(property = "dptcode", column = "dptcode"),
@Result(property = "dptname", column = "dptname"),
@Result(property = "series", column = "series"),
@Result(property = "author", column = "author"),
@Result(property = "reader", column = "reader"),
@Result(property = "fstdate", column = "fstdate"),
@Result(property = "fstdisc", column = "fstdisc"),
@Result(property = "lstdisc", column = "lstdisc"),
@Result(property = "maxdisc", column = "maxdisc"),
@Result(property = "mindisc", column = "mindisc"),
@Result(property = "vendor", column = "vendor"),
@Result(property = "transtitle", column = "transtitle"),
@Result(property = "inctax", column = "inctax"),
@Result(property = "originprice", column = "originprice"),
@Result(property = "currency", column = "currency"),
@Result(property = "status", column = "status"),
})
public List<TempItemFomPmp> select();
@Insert("<script>" +
"INSERT INTO temp_item_fom_pmp(id,plucode,pystype,isbn,scancode,title,jp,price,clscode,clsname,publisher,pubname,pubdate,dptcode,dptname,series,author,reader,fstdate,fstdisc,lstdisc,maxdisc,mindisc,vendor,transtitle,inctax,originprice,currency,status) VALUES" +
"<foreach collection='tempitemfompmps' item='item' index='index' separator=','>" +
"(#{item.id},#{item.plucode},#{item.pystype},#{item.isbn},#{item.scancode},#{item.title},#{item.jp},#{item.price},#{item.clscode},#{item.clsname},#{item.publisher},#{item.pubname},#{item.pubdate},#{item.dptcode},#{item.dptname},#{item.series},#{item.author},#{item.reader},#{item.fstdate},#{item.fstdisc},#{item.lstdisc},#{item.maxdisc},#{item.mindisc},#{item.vendor},#{item.transtitle},#{item.inctax},#{item.originprice},#{item.currency},#{item.status})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("tempitemfompmps") List<TempItemFomPmp> TempItemFomPmpList);
@Insert(
"INSERT INTO temp_item_fom_pmp(id,plucode,pystype,isbn,scancode,title,jp,price,clscode,clsname,publisher,pubname,pubdate,dptcode,dptname,series,author,reader,fstdate,fstdisc,lstdisc,maxdisc,mindisc,vendor,transtitle,inctax,originprice,currency,status) VALUES" +
"(#{id},#{plucode},#{pystype},#{isbn},#{scancode},#{title},#{jp},#{price},#{clscode},#{clsname},#{publisher},#{pubname},#{pubdate},#{dptcode},#{dptname},#{series},#{author},#{reader},#{fstdate},#{fstdisc},#{lstdisc},#{maxdisc},#{mindisc},#{vendor},#{transtitle},#{inctax},#{originprice},#{currency},#{status})"
)
Integer insert(TempItemFomPmp TempItemFomPmp);
@Select("select count(temp_item_fom_pmp.`id`) from temp_item_fom_pmp")
Integer findCount();
@Select("SELECT * FROM temp_item_fom_pmp LIMIT ${sta},10000")
@ResultMap("tempitemfompmp")
public List<TempItemFomPmp> findLimit(@Param("sta") int sta);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.TempItemSkuFomPmp;
/**
* @author author
*/
public interface TempItemSkuFomPmpMapper{
@Select("SELECT * FROM temp_item_sku_fom_pmp")
@Results(id = "tempitemskufompmp", value ={
@Result(property = "id", column = "id"),
@Result(property = "rack", column = "rack"),
@Result(property = "plucode", column = "plucode"),
@Result(property = "title", column = "title"),
@Result(property = "price", column = "price"),
@Result(property = "qty", column = "qty"),
})
public List<TempItemSkuFomPmp> select();
@Insert("<script>" +
"INSERT INTO temp_item_sku_fom_pmp(id,rack,plucode,title,price,qty) VALUES" +
"<foreach collection='tempitemskufompmps' item='item' index='index' separator=','>" +
"(#{item.id},#{item.rack},#{item.plucode},#{item.title},#{item.price},#{item.qty})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("tempitemskufompmps") List<TempItemSkuFomPmp> TempItemSkuFomPmpList);
@Insert(
"INSERT INTO temp_item_sku_fom_pmp(id,rack,plucode,title,price,qty) VALUES" +
"(#{id},#{rack},#{plucode},#{title},#{price},#{qty})"
)
Integer insert(TempItemSkuFomPmp TempItemSkuFomPmp);
}
\ No newline at end of file
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.TempLocatorFomPmp;
/**
* @author author
*/
public interface TempLocatorFomPmpMapper{
@Select("SELECT * FROM temp_locator_fom_pmp")
@Results(id = "templocatorfompmp", value ={
@Result(property = "id", column = "id"),
@Result(property = "code", column = "code"),
@Result(property = "wh", column = "wh"),
})
public List<TempLocatorFomPmp> select();
@Insert("<script>" +
"INSERT INTO temp_locator_fom_pmp(id,code,wh) VALUES" +
"<foreach collection='templocatorfompmps' item='item' index='index' separator=','>" +
"(#{item.id},#{item.code},#{item.wh})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("templocatorfompmps") List<TempLocatorFomPmp> TempLocatorFomPmpList);
@Insert(
"INSERT INTO temp_locator_fom_pmp(id,code,wh) VALUES" +
"(#{id},#{code},#{wh})"
)
Integer insert(TempLocatorFomPmp TempLocatorFomPmp);
}
\ No newline at end of file
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class InvCountPrint implements Serializable {
private static final long serialVersionUID = 1571647900102L;
/**
* 主键
* 主键
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 所属部门
* isNullAble:1
*/
@JSONField(name = "sys_org_code")
private String sysOrgCode;
/**
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
private String attributeCategory;
/**
* 备用字段1
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
/**
* 备用字段2
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
/**
* 备用字段3
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 备用字段5
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
private String attribute6;
/**
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
private String attribute7;
/**
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
private String attribute8;
/**
* 组织
* isNullAble:1
*/
@JSONField(name = "org_id")
private String orgId;
/**
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
private String attribute9;
/**
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
private String attribute10;
/**
* 盘点类型
* isNullAble:1
*/
@JSONField(name = "print_type")
private String printType;
/**
* 顺序号
* isNullAble:1
*/
@JSONField(name = "print_number")
private String printNumber;
/**
* 盘点计划名称
* isNullAble:1
*/
@JSONField(name = "print_name")
private String printName;
/**
* 盘点库存
* isNullAble:1
*/
@JSONField(name = "print_inv_id")
private String printInvId;
/**
* 备份日期
* isNullAble:1
*/
@JSONField(name = "print_date")
private java.time.LocalDateTime printDate;
/**
* 备注
* isNullAble:1
*/
@JSONField(name = "remark")
private String remark;
/**
* 来源类型
* isNullAble:1
*/
@JSONField(name = "source_type")
private String sourceType;
/**
* 来源头标识
* isNullAble:1
*/
@JSONField(name = "source_header_id")
private String sourceHeaderId;
/**
* 来源单号
* isNullAble:1
*/
@JSONField(name = "source_header_number")
private String sourceHeaderNumber;
/**
* 来源行标识
* isNullAble:1
*/
@JSONField(name = "source_line_id")
private String sourceLineId;
/**
* 来源行号
* isNullAble:1
*/
@JSONField(name = "source_line_number")
private String sourceLineNumber;
/**
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
* 创建日期
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime createTime;
/**
* 更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
* 更新日期
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setSysOrgCode(String sysOrgCode){this.sysOrgCode = sysOrgCode;}
public String getSysOrgCode(){return this.sysOrgCode;}
public void setAttributeCategory(String attributeCategory){this.attributeCategory = attributeCategory;}
public String getAttributeCategory(){return this.attributeCategory;}
public void setAttribute1(String attribute1){this.attribute1 = attribute1;}
public String getAttribute1(){return this.attribute1;}
public void setAttribute2(String attribute2){this.attribute2 = attribute2;}
public String getAttribute2(){return this.attribute2;}
public void setAttribute3(String attribute3){this.attribute3 = attribute3;}
public String getAttribute3(){return this.attribute3;}
public void setAttribute4(String attribute4){this.attribute4 = attribute4;}
public String getAttribute4(){return this.attribute4;}
public void setAttribute5(String attribute5){this.attribute5 = attribute5;}
public String getAttribute5(){return this.attribute5;}
public void setAttribute6(String attribute6){this.attribute6 = attribute6;}
public String getAttribute6(){return this.attribute6;}
public void setAttribute7(String attribute7){this.attribute7 = attribute7;}
public String getAttribute7(){return this.attribute7;}
public void setAttribute8(String attribute8){this.attribute8 = attribute8;}
public String getAttribute8(){return this.attribute8;}
public void setOrgId(String orgId){this.orgId = orgId;}
public String getOrgId(){return this.orgId;}
public void setAttribute9(String attribute9){this.attribute9 = attribute9;}
public String getAttribute9(){return this.attribute9;}
public void setAttribute10(String attribute10){this.attribute10 = attribute10;}
public String getAttribute10(){return this.attribute10;}
public void setPrintType(String printType){this.printType = printType;}
public String getPrintType(){return this.printType;}
public void setPrintNumber(String printNumber){this.printNumber = printNumber;}
public String getPrintNumber(){return this.printNumber;}
public void setPrintName(String printName){this.printName = printName;}
public String getPrintName(){return this.printName;}
public void setPrintInvId(String printInvId){this.printInvId = printInvId;}
public String getPrintInvId(){return this.printInvId;}
public void setPrintDate(java.time.LocalDateTime printDate){this.printDate = printDate;}
public java.time.LocalDateTime getPrintDate(){return this.printDate;}
public void setRemark(String remark){this.remark = remark;}
public String getRemark(){return this.remark;}
public void setSourceType(String sourceType){this.sourceType = sourceType;}
public String getSourceType(){return this.sourceType;}
public void setSourceHeaderId(String sourceHeaderId){this.sourceHeaderId = sourceHeaderId;}
public String getSourceHeaderId(){return this.sourceHeaderId;}
public void setSourceHeaderNumber(String sourceHeaderNumber){this.sourceHeaderNumber = sourceHeaderNumber;}
public String getSourceHeaderNumber(){return this.sourceHeaderNumber;}
public void setSourceLineId(String sourceLineId){this.sourceLineId = sourceLineId;}
public String getSourceLineId(){return this.sourceLineId;}
public void setSourceLineNumber(String sourceLineNumber){this.sourceLineNumber = sourceLineNumber;}
public String getSourceLineNumber(){return this.sourceLineNumber;}
public void setCreateBy(String createBy){this.createBy = createBy;}
public String getCreateBy(){return this.createBy;}
public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}
public java.time.LocalDateTime getCreateTime(){return this.createTime;}
public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
public String getUpdateBy(){return this.updateBy;}
public void setUpdateTime(java.time.LocalDateTime updateTime){this.updateTime = updateTime;}
public java.time.LocalDateTime getUpdateTime(){return this.updateTime;}
@Override
public String toString() {
return "InvCountPrint{" +
"id='" + id + '\'' +
"sysOrgCode='" + sysOrgCode + '\'' +
"attributeCategory='" + attributeCategory + '\'' +
"attribute1='" + attribute1 + '\'' +
"attribute2='" + attribute2 + '\'' +
"attribute3='" + attribute3 + '\'' +
"attribute4='" + attribute4 + '\'' +
"attribute5='" + attribute5 + '\'' +
"attribute6='" + attribute6 + '\'' +
"attribute7='" + attribute7 + '\'' +
"attribute8='" + attribute8 + '\'' +
"orgId='" + orgId + '\'' +
"attribute9='" + attribute9 + '\'' +
"attribute10='" + attribute10 + '\'' +
"printType='" + printType + '\'' +
"printNumber='" + printNumber + '\'' +
"printName='" + printName + '\'' +
"printInvId='" + printInvId + '\'' +
"printDate='" + printDate + '\'' +
"remark='" + remark + '\'' +
"sourceType='" + sourceType + '\'' +
"sourceHeaderId='" + sourceHeaderId + '\'' +
"sourceHeaderNumber='" + sourceHeaderNumber + '\'' +
"sourceLineId='" + sourceLineId + '\'' +
"sourceLineNumber='" + sourceLineNumber + '\'' +
"createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' +
"updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class InvCountPrintLine implements Serializable {
private static final long serialVersionUID = 1571647937711L;
/**
* 主键
* 主键
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
* 创建日期
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime createTime;
/**
* 更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
* 更新日期
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
/**
* 所属部门
* isNullAble:1
*/
@JSONField(name = "sys_org_code")
private String sysOrgCode;
/**
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
private String attributeCategory;
/**
* 备用字段1
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
/**
* 备用字段2
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
/**
* 备用字段3
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 备用字段5
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
private String attribute6;
/**
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
private String attribute7;
/**
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
private String attribute8;
/**
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
private String attribute9;
/**
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
private String attribute10;
/**
* 盘点方案id
* isNullAble:1
*/
@JSONField(name = "print_id")
private String printId;
/**
* 来源类型
* isNullAble:1
*/
@JSONField(name = "source_type")
private String sourceType;
/**
* 来源头标识
* isNullAble:1
*/
@JSONField(name = "source_header_id")
private String sourceHeaderId;
/**
* 来源单号
* isNullAble:1
*/
@JSONField(name = "source_header_number")
private String sourceHeaderNumber;
/**
* 来源行标识
* isNullAble:1
*/
@JSONField(name = "source_line_id")
private String sourceLineId;
/**
* 来源行号
* isNullAble:1
*/
@JSONField(name = "source_line_number")
private String sourceLineNumber;
/**
* 比较
* isNullAble:1
*/
@JSONField(name = "compare")
private String compare;
/**
* 逻辑
* isNullAble:1
*/
@JSONField(name = "logic")
private String logic;
/**
* 比较值
* isNullAble:1
*/
@JSONField(name = "comparison_values")
private String comparisonValues;
/**
* 名称
* isNullAble:1
*/
@JSONField(name = "fields")
private String fields;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setCreateBy(String createBy){this.createBy = createBy;}
public String getCreateBy(){return this.createBy;}
public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}
public java.time.LocalDateTime getCreateTime(){return this.createTime;}
public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
public String getUpdateBy(){return this.updateBy;}
public void setUpdateTime(java.time.LocalDateTime updateTime){this.updateTime = updateTime;}
public java.time.LocalDateTime getUpdateTime(){return this.updateTime;}
public void setSysOrgCode(String sysOrgCode){this.sysOrgCode = sysOrgCode;}
public String getSysOrgCode(){return this.sysOrgCode;}
public void setAttributeCategory(String attributeCategory){this.attributeCategory = attributeCategory;}
public String getAttributeCategory(){return this.attributeCategory;}
public void setAttribute1(String attribute1){this.attribute1 = attribute1;}
public String getAttribute1(){return this.attribute1;}
public void setAttribute2(String attribute2){this.attribute2 = attribute2;}
public String getAttribute2(){return this.attribute2;}
public void setAttribute3(String attribute3){this.attribute3 = attribute3;}
public String getAttribute3(){return this.attribute3;}
public void setAttribute4(String attribute4){this.attribute4 = attribute4;}
public String getAttribute4(){return this.attribute4;}
public void setAttribute5(String attribute5){this.attribute5 = attribute5;}
public String getAttribute5(){return this.attribute5;}
public void setAttribute6(String attribute6){this.attribute6 = attribute6;}
public String getAttribute6(){return this.attribute6;}
public void setAttribute7(String attribute7){this.attribute7 = attribute7;}
public String getAttribute7(){return this.attribute7;}
public void setAttribute8(String attribute8){this.attribute8 = attribute8;}
public String getAttribute8(){return this.attribute8;}
public void setAttribute9(String attribute9){this.attribute9 = attribute9;}
public String getAttribute9(){return this.attribute9;}
public void setAttribute10(String attribute10){this.attribute10 = attribute10;}
public String getAttribute10(){return this.attribute10;}
public void setPrintId(String printId){this.printId = printId;}
public String getPrintId(){return this.printId;}
public void setSourceType(String sourceType){this.sourceType = sourceType;}
public String getSourceType(){return this.sourceType;}
public void setSourceHeaderId(String sourceHeaderId){this.sourceHeaderId = sourceHeaderId;}
public String getSourceHeaderId(){return this.sourceHeaderId;}
public void setSourceHeaderNumber(String sourceHeaderNumber){this.sourceHeaderNumber = sourceHeaderNumber;}
public String getSourceHeaderNumber(){return this.sourceHeaderNumber;}
public void setSourceLineId(String sourceLineId){this.sourceLineId = sourceLineId;}
public String getSourceLineId(){return this.sourceLineId;}
public void setSourceLineNumber(String sourceLineNumber){this.sourceLineNumber = sourceLineNumber;}
public String getSourceLineNumber(){return this.sourceLineNumber;}
public void setCompare(String compare){this.compare = compare;}
public String getCompare(){return this.compare;}
public void setLogic(String logic){this.logic = logic;}
public String getLogic(){return this.logic;}
public void setComparisonValues(String comparisonValues){this.comparisonValues = comparisonValues;}
public String getComparisonValues(){return this.comparisonValues;}
public void setFields(String fields){this.fields = fields;}
public String getFields(){return this.fields;}
@Override
public String toString() {
return "InvCountPrintLine{" +
"id='" + id + '\'' +
"createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' +
"updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' +
"sysOrgCode='" + sysOrgCode + '\'' +
"attributeCategory='" + attributeCategory + '\'' +
"attribute1='" + attribute1 + '\'' +
"attribute2='" + attribute2 + '\'' +
"attribute3='" + attribute3 + '\'' +
"attribute4='" + attribute4 + '\'' +
"attribute5='" + attribute5 + '\'' +
"attribute6='" + attribute6 + '\'' +
"attribute7='" + attribute7 + '\'' +
"attribute8='" + attribute8 + '\'' +
"attribute9='" + attribute9 + '\'' +
"attribute10='" + attribute10 + '\'' +
"printId='" + printId + '\'' +
"sourceType='" + sourceType + '\'' +
"sourceHeaderId='" + sourceHeaderId + '\'' +
"sourceHeaderNumber='" + sourceHeaderNumber + '\'' +
"sourceLineId='" + sourceLineId + '\'' +
"sourceLineNumber='" + sourceLineNumber + '\'' +
"compare='" + compare + '\'' +
"logic='" + logic + '\'' +
"comparisonValues='" + comparisonValues + '\'' +
"fields='" + fields + '\'' +
'}';
}
}
......@@ -6,159 +6,355 @@ import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
*
* @author author
*/
public class InvItemBalanceSummaryV implements Serializable {
private static final long serialVersionUID = 1568255882376L;
private static final long serialVersionUID = 1571477475009L;
/**
* 库存
* isNullAble:0
*/
@JSONField(name = "inv_id")
* 库存
* isNullAble:0
*/
@JSONField(name = "inv_id")
private String inv_id;
/**
* 库区
* isNullAble:0
*/
@JSONField(name = "subinv_id")
* 库区
* isNullAble:0
*/
@JSONField(name = "subinv_id")
private String subinv_id;
/**
* 货位
* isNullAble:1
*/
@JSONField(name = "locator_id")
* 货位
* isNullAble:1
*/
@JSONField(name = "locator_id")
private String locator_id;
/**
* 物料
* isNullAble:0
*/
@JSONField(name = "item_id")
* 物料
* isNullAble:0
*/
@JSONField(name = "item_id")
private String item_id;
/**
*
* isNullAble:1
*/
@JSONField(name = "balance")
*
* isNullAble:1
*/
@JSONField(name = "balance")
private java.math.BigDecimal balance;
/**
* 库存代码
* isNullAble:1
*/
@JSONField(name = "inv_code")
* 库存代码
* isNullAble:1
*/
@JSONField(name = "inv_code")
private String inv_code;
/**
* 库存名称
* isNullAble:1
*/
@JSONField(name = "inv_name")
* 库存名称
* isNullAble:1
*/
@JSONField(name = "inv_name")
private String inv_name;
/**
* 库区代码
* isNullAble:1
*/
@JSONField(name = "subinv_code")
* 库区代码
* isNullAble:1
*/
@JSONField(name = "subinv_code")
private String subinv_code;
/**
* 库区名称
* isNullAble:1
*/
@JSONField(name = "subinv_name")
* 库区名称
* isNullAble:1
*/
@JSONField(name = "subinv_name")
private String subinv_name;
/**
* 货架代码
* isNullAble:1
*/
@JSONField(name = "locator_code")
* 货架代码
* isNullAble:1
*/
@JSONField(name = "locator_code")
private String locator_code;
/**
* 货架名称
* isNullAble:1
*/
@JSONField(name = "locator_name")
* 货架名称
* isNullAble:1
*/
@JSONField(name = "locator_name")
private String locator_name;
/**
* 商品代码
* isNullAble:1
*/
@JSONField(name = "item_code")
* 商品类型
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
/**
* 采购类型
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
/**
* 寄售
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 扣点%
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 库存信息同步到pmp
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 商品介质
* isNullAble:1
*/
@JSONField(name = "pystype")
private String pystype;
/**
* 商品属性
* isNullAble:1,defaultVal:0
*/
@JSONField(name = "media")
private String media;
/**
* ISBN
* isNullAble:1
*/
@JSONField(name = "isbn")
private String isbn;
/**
* 货号
* isNullAble:1
*/
@JSONField(name = "plucode")
private String plucode;
/**
* 延长码
* isNullAble:1,defaultVal:0
*/
@JSONField(name = "extcode")
private String extcode;
/**
* 营销分类
* isNullAble:1
*/
@JSONField(name = "general_name")
private String general_name;
/**
* CIP分类
* isNullAble:1
*/
@JSONField(name = "cip")
private String cip;
/**
* 出版商
* isNullAble:1
*/
@JSONField(name = "manufacturer_id")
private String manufacturer_id;
/**
* 实物图片
* isNullAble:1
*/
@JSONField(name = "image_url")
private String image_url;
/**
* 包装数量
* isNullAble:1
*/
@JSONField(name = "pack_qty")
private String pack_qty;
/**
* 包装单位
* isNullAble:1
*/
@JSONField(name = "pack_unit")
private String pack_unit;
/**
* 税率
* isNullAble:1
*/
@JSONField(name = "tax")
private String tax;
/**
* 是否套装商品
* isNullAble:1
*/
@JSONField(name = "isset")
private String isset;
/**
* 组织
* isNullAble:1
*/
@JSONField(name = "org_id")
private String org_id;
/**
* 资料制作人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String create_by;
/**
* 资料制作日期
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime create_time;
/**
* 资料修改人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String update_by;
/**
* 资料修改日期
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime update_time;
/**
* 商品分类
* isNullAble:1
*/
@JSONField(name = "pro_type")
private String pro_type;
/**
* 可借阅
* isNullAble:1
*/
@JSONField(name = "is_borrow")
private String is_borrow;
/**
* RFID
* isNullAble:1
*/
@JSONField(name = "rfid")
private String rfid;
/**
* 语言
* isNullAble:1
*/
@JSONField(name = "language")
private String language;
/**
* 营销状态
* isNullAble:1
*/
@JSONField(name = "marketing_status")
private String marketing_status;
/**
* 商品代码
* isNullAble:1
*/
@JSONField(name = "item_code")
private String item_code;
/**
* 扫描码
* isNullAble:1
*/
@JSONField(name = "scancode")
* 扫描码
* isNullAble:1
*/
@JSONField(name = "scancode")
private String scancode;
/**
* 价格
* isNullAble:1
*/
@JSONField(name = "purchase_price")
* 价格
* isNullAble:1
*/
@JSONField(name = "purchase_price")
private String purchase_price;
/**
* 商品名称
* isNullAble:1
*/
@JSONField(name = "item_name")
* 商品名称
* isNullAble:1
*/
@JSONField(name = "item_name")
private String item_name;
/**
* 商品简称
* isNullAble:1
*/
@JSONField(name = "item_desc")
* 商品简称
* isNullAble:1
*/
@JSONField(name = "item_desc")
private String item_desc;
/**
* 库存上限
* isNullAble:1
*/
@JSONField(name = "max_inv_qty")
* 库存上限
* isNullAble:1
*/
@JSONField(name = "max_inv_qty")
private String max_inv_qty;
/**
* 库存下限
* isNullAble:1
*/
@JSONField(name = "min_inv_qty")
* 库存下限
* isNullAble:1
*/
@JSONField(name = "min_inv_qty")
private String min_inv_qty;
/**
* 出版日期
* isNullAble:1
*/
@JSONField(name = "specification")
* 出版日期
* isNullAble:1
*/
@JSONField(name = "specification")
private java.time.LocalDateTime specification;
/**
* 单位
* isNullAble:1
*/
@JSONField(name = "unit_code")
* 单位
* isNullAble:1
*/
@JSONField(name = "unit_code")
private String unit_code;
/**
*
* isNullAble:1
*/
@JSONField(name = "unit_name")
*
* isNullAble:1
*/
@JSONField(name = "unit_name")
private String unit_name;
......@@ -206,6 +402,118 @@ public class InvItemBalanceSummaryV implements Serializable {
public String getLocator_name(){return this.locator_name;}
public void setAttribute1(String attribute1){this.attribute1 = attribute1;}
public String getAttribute1(){return this.attribute1;}
public void setAttribute2(String attribute2){this.attribute2 = attribute2;}
public String getAttribute2(){return this.attribute2;}
public void setAttribute3(String attribute3){this.attribute3 = attribute3;}
public String getAttribute3(){return this.attribute3;}
public void setAttribute4(String attribute4){this.attribute4 = attribute4;}
public String getAttribute4(){return this.attribute4;}
public void setAttribute5(String attribute5){this.attribute5 = attribute5;}
public String getAttribute5(){return this.attribute5;}
public void setPystype(String pystype){this.pystype = pystype;}
public String getPystype(){return this.pystype;}
public void setMedia(String media){this.media = media;}
public String getMedia(){return this.media;}
public void setIsbn(String isbn){this.isbn = isbn;}
public String getIsbn(){return this.isbn;}
public void setPlucode(String plucode){this.plucode = plucode;}
public String getPlucode(){return this.plucode;}
public void setExtcode(String extcode){this.extcode = extcode;}
public String getExtcode(){return this.extcode;}
public void setGeneral_name(String general_name){this.general_name = general_name;}
public String getGeneral_name(){return this.general_name;}
public void setCip(String cip){this.cip = cip;}
public String getCip(){return this.cip;}
public void setManufacturer_id(String manufacturer_id){this.manufacturer_id = manufacturer_id;}
public String getManufacturer_id(){return this.manufacturer_id;}
public void setImage_url(String image_url){this.image_url = image_url;}
public String getImage_url(){return this.image_url;}
public void setPack_qty(String pack_qty){this.pack_qty = pack_qty;}
public String getPack_qty(){return this.pack_qty;}
public void setPack_unit(String pack_unit){this.pack_unit = pack_unit;}
public String getPack_unit(){return this.pack_unit;}
public void setTax(String tax){this.tax = tax;}
public String getTax(){return this.tax;}
public void setIsset(String isset){this.isset = isset;}
public String getIsset(){return this.isset;}
public void setOrg_id(String org_id){this.org_id = org_id;}
public String getOrg_id(){return this.org_id;}
public void setCreate_by(String create_by){this.create_by = create_by;}
public String getCreate_by(){return this.create_by;}
public void setCreate_time(java.time.LocalDateTime create_time){this.create_time = create_time;}
public java.time.LocalDateTime getCreate_time(){return this.create_time;}
public void setUpdate_by(String update_by){this.update_by = update_by;}
public String getUpdate_by(){return this.update_by;}
public void setUpdate_time(java.time.LocalDateTime update_time){this.update_time = update_time;}
public java.time.LocalDateTime getUpdate_time(){return this.update_time;}
public void setPro_type(String pro_type){this.pro_type = pro_type;}
public String getPro_type(){return this.pro_type;}
public void setIs_borrow(String is_borrow){this.is_borrow = is_borrow;}
public String getIs_borrow(){return this.is_borrow;}
public void setRfid(String rfid){this.rfid = rfid;}
public String getRfid(){return this.rfid;}
public void setLanguage(String language){this.language = language;}
public String getLanguage(){return this.language;}
public void setMarketing_status(String marketing_status){this.marketing_status = marketing_status;}
public String getMarketing_status(){return this.marketing_status;}
public void setItem_code(String item_code){this.item_code = item_code;}
public String getItem_code(){return this.item_code;}
......@@ -259,6 +567,34 @@ public class InvItemBalanceSummaryV implements Serializable {
"subinv_name='" + subinv_name + '\'' +
"locator_code='" + locator_code + '\'' +
"locator_name='" + locator_name + '\'' +
"attribute1='" + attribute1 + '\'' +
"attribute2='" + attribute2 + '\'' +
"attribute3='" + attribute3 + '\'' +
"attribute4='" + attribute4 + '\'' +
"attribute5='" + attribute5 + '\'' +
"pystype='" + pystype + '\'' +
"media='" + media + '\'' +
"isbn='" + isbn + '\'' +
"plucode='" + plucode + '\'' +
"extcode='" + extcode + '\'' +
"general_name='" + general_name + '\'' +
"cip='" + cip + '\'' +
"manufacturer_id='" + manufacturer_id + '\'' +
"image_url='" + image_url + '\'' +
"pack_qty='" + pack_qty + '\'' +
"pack_unit='" + pack_unit + '\'' +
"tax='" + tax + '\'' +
"isset='" + isset + '\'' +
"org_id='" + org_id + '\'' +
"create_by='" + create_by + '\'' +
"create_time='" + create_time + '\'' +
"update_by='" + update_by + '\'' +
"update_time='" + update_time + '\'' +
"pro_type='" + pro_type + '\'' +
"is_borrow='" + is_borrow + '\'' +
"rfid='" + rfid + '\'' +
"language='" + language + '\'' +
"marketing_status='" + marketing_status + '\'' +
"item_code='" + item_code + '\'' +
"scancode='" + scancode + '\'' +
"purchase_price='" + purchase_price + '\'' +
......@@ -269,7 +605,7 @@ public class InvItemBalanceSummaryV implements Serializable {
"specification='" + specification + '\'' +
"unit_code='" + unit_code + '\'' +
"unit_name='" + unit_name + '\'' +
'}';
'}';
}
}
......@@ -4,152 +4,176 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author
*/
*
* @author author
*/
public class InvSubinventory implements Serializable {
private static final long serialVersionUID = 1552987664682L;
private static final long serialVersionUID = 1571969326391L;
/**
* 主键
* 主键
* isNullAble:0
*/
* 主键
* 主键
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 创建人
* isNullAble:1
*/
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
* 创建日期
* isNullAble:1
*/
private java.time.LocalDateTime createTime;
* 创建日期
* isNullAble:1
*/
@JSONField(name = "create_date")
private java.time.LocalDateTime createDate;
/**
* 最后更新人
* isNullAble:1
*/
* 最后更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
* 最后更新日期
* isNullAble:1
*/
* 最后更新日期
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
/**
* 备用字段分类
* isNullAble:1
*/
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
private String attributeCategory;
/**
* 备用字段1
* isNullAble:1
*/
* 备用字段1
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
/**
* 备用字段2
* isNullAble:1
*/
* 备用字段2
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
/**
* 备用子段3
* isNullAble:1
*/
* 备用子段3
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 备用字段4
* isNullAble:1
*/
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 备用字段5
* isNullAble:1
*/
* 备用字段5
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 备用字段6
* isNullAble:1
*/
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
private String attribute6;
/**
* 备用字段7
* isNullAble:1
*/
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
private String attribute7;
/**
* 备用字段8
* isNullAble:1
*/
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
private String attribute8;
/**
* 备用字段9
* isNullAble:1
*/
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
private String attribute9;
/**
* 备用字段10
* isNullAble:1
*/
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
private String attribute10;
/**
* 库存
* isNullAble:0
*/
* 库存
* isNullAble:0
*/
@JSONField(name = "inv_id")
private String invId;
/**
* 子库存类型
* isNullAble:0
*/
* 库区类型
* isNullAble:0
*/
@JSONField(name = "subinv_type")
private String subinvType;
/**
* 子库存代码
* isNullAble:0
*/
* 库区代码
* isNullAble:0
*/
@JSONField(name = "subinv_code")
private String subinvCode;
/**
* 子库存名称
* isNullAble:0
*/
* 库区名称
* isNullAble:0
*/
@JSONField(name = "subinv_name")
private String subinvName;
/**
* 子库存说明
* isNullAble:1
*/
* 库区说明
* isNullAble:1
*/
@JSONField(name = "subinv_desc")
private String subinvDesc;
/**
* 货位控制
* isNullAble:0
*/
* 启用货架
* isNullAble:0
*/
@JSONField(name = "locator_control")
private String locatorControl;
/**
* 状态
* isNullAble:0,defaultVal:A
*/
* 状态
* isNullAble:0,defaultVal:A
*/
@JSONField(name = "status")
private String status;
......@@ -161,9 +185,9 @@ public class InvSubinventory implements Serializable {
public String getCreateBy(){return this.createBy;}
public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}
public void setCreateDate(java.time.LocalDateTime createDate){this.createDate = createDate;}
public java.time.LocalDateTime getCreateTime(){return this.createTime;}
public java.time.LocalDateTime getCreateDate(){return this.createDate;}
public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
......@@ -249,7 +273,7 @@ public class InvSubinventory implements Serializable {
return "InvSubinventory{" +
"id='" + id + '\'' +
"createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' +
"createDate='" + createDate + '\'' +
"updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' +
"attributeCategory='" + attributeCategory + '\'' +
......@@ -270,7 +294,7 @@ public class InvSubinventory implements Serializable {
"subinvDesc='" + subinvDesc + '\'' +
"locatorControl='" + locatorControl + '\'' +
"status='" + status + '\'' +
'}';
'}';
}
}
......@@ -6,315 +6,365 @@ import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author
*/
*
* @author author
*/
public class SalOrderLineV implements Serializable {
private static final long serialVersionUID = 1564543279682L;
private static final long serialVersionUID = 1571555116969L;
/**
* 组织代码
* isNullAble:0
*/
@JSONField(name = "org_code")
* 组织代码
* isNullAble:0
*/
@JSONField(name = "org_code")
private String orgCode;
/**
* 组织名称
* isNullAble:0
*/
@JSONField(name = "org_name")
* 组织名称
* isNullAble:0
*/
@JSONField(name = "org_name")
private String orgName;
/**
* 物料代码
* isNullAble:0
*/
@JSONField(name = "item_code")
private String itemCode;
* 采购类型
* isNullAble:0
*/
@JSONField(name = "item_type")
private String itemType;
/**
*
* isNullAble:1
*/
@JSONField(name = "item_name")
private String itemName;
* 货号
* isNullAble:1
*/
@JSONField(name = "plucode")
private String plucode;
/**
*
* isNullAble:0,defaultVal:0
*/
@JSONField(name = "shippable_quantity")
private Integer shippableQuantity;
* 库存
* isNullAble:1
*/
@JSONField(name = "inv_id")
private String invId;
/**
* 商品代码
* isNullAble:1
*/
@JSONField(name = "item_code")
private String itemCode;
/**
*
* isNullAble:1
*/
@JSONField(name = "line_status_name")
*
* isNullAble:1
*/
@JSONField(name = "line_status_name")
private String lineStatusName;
/**
*
* isNullAble:1
*/
@JSONField(name = "source_type_name")
*
* isNullAble:1
*/
@JSONField(name = "source_type_name")
private String sourceTypeName;
/**
* 主键
* isNullAble:0
*/
@JSONField(name = "id")
*
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
* 最后更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
* 最后更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
private String attributeCategory;
/**
* 备用字段1
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
* 价格
* isNullAble:1
*/
@JSONField(name = "attribute1")
private Double attribute1;
/**
* 备用字段2
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
* 金额
* isNullAble:1
*/
@JSONField(name = "attribute2")
private Double attribute2;
/**
* 备用子段3
* isNullAble:1
*/
@JSONField(name = "attribute3")
* 折扣%
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 备用字段5
* isNullAble:1
*/
@JSONField(name = "attribute5")
* 需求是否提醒
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
private String attribute6;
/**
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
private String attribute7;
/**
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
private String attribute8;
/**
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
private String attribute9;
/**
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
private String attribute10;
/**
* 组织
* isNullAble:0
*/
@JSONField(name = "org_id")
* 组织
* isNullAble:1
*/
@JSONField(name = "org_id")
private String orgId;
/**
* 订单
* isNullAble:0
*/
@JSONField(name = "sal_order_header_id")
* 订单
* isNullAble:1
*/
@JSONField(name = "sal_order_header_id")
private String salOrderHeaderId;
/**
* 行号
* isNullAble:0
*/
@JSONField(name = "line_number")
* 行号
* isNullAble:0
*/
@JSONField(name = "line_number")
private String lineNumber;
/**
* 物料
* isNullAble:0
*/
@JSONField(name = "item_id")
* 商品名称
* isNullAble:0
*/
@JSONField(name = "item_name")
private String itemName;
/**
* 商品
* isNullAble:1
*/
@JSONField(name = "item_id")
private String itemId;
/**
* 数量
* isNullAble:0
*/
@JSONField(name = "quantity")
* 数量
* isNullAble:0
*/
@JSONField(name = "quantity")
private Integer quantity;
/**
* 单位
* isNullAble:0
*/
@JSONField(name = "unit_code")
* 单位
* isNullAble:0
*/
@JSONField(name = "unit_code")
private String unitCode;
/**
* 价目表价格
* isNullAble:0
*/
@JSONField(name = "list_price")
private java.math.BigDecimal listPrice;
* 价目表价格
* isNullAble:1
*/
@JSONField(name = "list_price")
private Double listPrice;
/**
* 销售价格
* isNullAble:0
*/
@JSONField(name = "sale_price")
private java.math.BigDecimal salePrice;
* 码洋
* isNullAble:0
*/
@JSONField(name = "sale_price")
private Double salePrice;
/**
* 税率
* isNullAble:0
*/
@JSONField(name = "tax_rate")
private java.math.BigDecimal taxRate;
* 税率
* isNullAble:0
*/
@JSONField(name = "tax_rate")
private String taxRate;
/**
* 需求日期
* isNullAble:1
*/
@JSONField(name = "required_date")
* 需求日期
* isNullAble:1
*/
@JSONField(name = "required_date")
private java.time.LocalDateTime requiredDate;
/**
* 备注
* isNullAble:1
*/
@JSONField(name = "line_remark")
* 备注
* isNullAble:1
*/
@JSONField(name = "line_remark")
private String lineRemark;
/**
* 来源类型
* isNullAble:1
*/
@JSONField(name = "source_type")
* 来源类型
* isNullAble:1
*/
@JSONField(name = "source_type")
private String sourceType;
/**
* 来源头标识
* isNullAble:1
*/
@JSONField(name = "source_header_id")
* 来源头标识
* isNullAble:1
*/
@JSONField(name = "source_header_id")
private String sourceHeaderId;
/**
* 来源行标识
* isNullAble:1
*/
@JSONField(name = "source_line_id")
* 来源行标识
* isNullAble:1
*/
@JSONField(name = "source_line_id")
private String sourceLineId;
/**
* 状态
* isNullAble:1
*/
@JSONField(name = "line_status")
* 状态
* isNullAble:1
*/
@JSONField(name = "line_status")
private String lineStatus;
/**
* 发运日期
* isNullAble:1
*/
@JSONField(name = "shipping_date")
* 发运日期
* isNullAble:1
*/
@JSONField(name = "shipping_date")
private java.time.LocalDateTime shippingDate;
/**
* 创建人组织
* isNullAble:1
*/
@JSONField(name = "sys_org_code")
* 创建人组织
* isNullAble:1
*/
@JSONField(name = "sys_org_code")
private String sysOrgCode;
/**
* 来源行号
* isNullAble:1
*/
@JSONField(name = "source_line_number")
* 来源行号
* isNullAble:1
*/
@JSONField(name = "source_line_number")
private String sourceLineNumber;
/**
* 创建日期
* isNullAble:1
*/
@JSONField(name = "create_time")
* 创建时间
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime createTime;
/**
* 计价日期
* isNullAble:1
*/
@JSONField(name = "pricing_date")
* 计价日期
* isNullAble:1
*/
@JSONField(name = "pricing_date")
private java.time.LocalDateTime pricingDate;
/**
* 最后更新日期
* isNullAble:1
*/
@JSONField(name = "update_time")
* 最后更新时间
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
/**
* 来源单号
* isNullAble:1
*/
@JSONField(name = "source_header_number")
* 外键
* isNullAble:1
*/
@JSONField(name = "order_header_id")
private String orderHeaderId;
/**
* 来源单号
* isNullAble:1
*/
@JSONField(name = "source_header_number")
private String sourceHeaderNumber;
/**
* 订单编号
* isNullAble:1
*/
@JSONField(name = "order_number")
private String orderNumber;
/**
* 订单日期
* isNullAble:1
*/
@JSONField(name = "order_date")
private java.time.LocalDateTime orderDate;
/**
* 销售员
* isNullAble:1
*/
@JSONField(name = "seller_id")
private String sellerId;
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public void setOrgCode(String orgCode){this.orgCode = orgCode;}
......@@ -324,17 +374,17 @@ public class SalOrderLineV implements Serializable {
public String getOrgName(){return this.orgName;}
public void setItemCode(String itemCode){this.itemCode = itemCode;}
public void setItemType(String itemType){this.itemType = itemType;}
public String getItemCode(){return this.itemCode;}
public String getItemType(){return this.itemType;}
public void setItemName(String itemName){this.itemName = itemName;}
public void setPlucode(String plucode){this.plucode = plucode;}
public String getItemName(){return this.itemName;}
public String getPlucode(){return this.plucode;}
public void setShippableQuantity(Integer shippableQuantity){this.shippableQuantity = shippableQuantity;}
public void setInvId(String invId){this.invId = invId;}
public Integer getShippableQuantity(){return this.shippableQuantity;}
public String getInvId(){return this.invId;}
public void setLineStatusName(String lineStatusName){this.lineStatusName = lineStatusName;}
......@@ -360,13 +410,13 @@ public class SalOrderLineV implements Serializable {
public String getAttributeCategory(){return this.attributeCategory;}
public void setAttribute1(String attribute1){this.attribute1 = attribute1;}
public void setAttribute1(Double attribute1){this.attribute1 = attribute1;}
public String getAttribute1(){return this.attribute1;}
public Double getAttribute1(){return this.attribute1;}
public void setAttribute2(String attribute2){this.attribute2 = attribute2;}
public void setAttribute2(Double attribute2){this.attribute2 = attribute2;}
public String getAttribute2(){return this.attribute2;}
public Double getAttribute2(){return this.attribute2;}
public void setAttribute3(String attribute3){this.attribute3 = attribute3;}
......@@ -412,6 +462,10 @@ public class SalOrderLineV implements Serializable {
public String getLineNumber(){return this.lineNumber;}
public void setItemName(String itemName){this.itemName = itemName;}
public String getItemName(){return this.itemName;}
public void setItemId(String itemId){this.itemId = itemId;}
public String getItemId(){return this.itemId;}
......@@ -424,17 +478,17 @@ public class SalOrderLineV implements Serializable {
public String getUnitCode(){return this.unitCode;}
public void setListPrice(java.math.BigDecimal listPrice){this.listPrice = listPrice;}
public void setListPrice(Double listPrice){this.listPrice = listPrice;}
public java.math.BigDecimal getListPrice(){return this.listPrice;}
public Double getListPrice(){return this.listPrice;}
public void setSalePrice(java.math.BigDecimal salePrice){this.salePrice = salePrice;}
public void setSalePrice(Double salePrice){this.salePrice = salePrice;}
public java.math.BigDecimal getSalePrice(){return this.salePrice;}
public Double getSalePrice(){return this.salePrice;}
public void setTaxRate(java.math.BigDecimal taxRate){this.taxRate = taxRate;}
public void setTaxRate(String taxRate){this.taxRate = taxRate;}
public java.math.BigDecimal getTaxRate(){return this.taxRate;}
public String getTaxRate(){return this.taxRate;}
public void setRequiredDate(java.time.LocalDateTime requiredDate){this.requiredDate = requiredDate;}
......@@ -484,17 +538,33 @@ public class SalOrderLineV implements Serializable {
public java.time.LocalDateTime getUpdateTime(){return this.updateTime;}
public void setOrderHeaderId(String orderHeaderId){this.orderHeaderId = orderHeaderId;}
public String getOrderHeaderId(){return this.orderHeaderId;}
public void setSourceHeaderNumber(String sourceHeaderNumber){this.sourceHeaderNumber = sourceHeaderNumber;}
public String getSourceHeaderNumber(){return this.sourceHeaderNumber;}
public void setOrderNumber(String orderNumber){this.orderNumber = orderNumber;}
public String getOrderNumber(){return this.orderNumber;}
public void setOrderDate(java.time.LocalDateTime orderDate){this.orderDate = orderDate;}
public java.time.LocalDateTime getOrderDate(){return this.orderDate;}
public void setSellerId(String sellerId){this.sellerId = sellerId;}
public String getSellerId(){return this.sellerId;}
@Override
public String toString() {
return "SalOrderLineV{" +
"orgCode='" + orgCode + '\'' +
"orgName='" + orgName + '\'' +
"itemCode='" + itemCode + '\'' +
"itemName='" + itemName + '\'' +
"shippableQuantity='" + shippableQuantity + '\'' +
"itemType='" + itemType + '\'' +
"plucode='" + plucode + '\'' +
"invId='" + invId + '\'' +
"lineStatusName='" + lineStatusName + '\'' +
"sourceTypeName='" + sourceTypeName + '\'' +
"id='" + id + '\'' +
......@@ -514,6 +584,7 @@ public class SalOrderLineV implements Serializable {
"orgId='" + orgId + '\'' +
"salOrderHeaderId='" + salOrderHeaderId + '\'' +
"lineNumber='" + lineNumber + '\'' +
"itemName='" + itemName + '\'' +
"itemId='" + itemId + '\'' +
"quantity='" + quantity + '\'' +
"unitCode='" + unitCode + '\'' +
......@@ -532,8 +603,12 @@ public class SalOrderLineV implements Serializable {
"createTime='" + createTime + '\'' +
"pricingDate='" + pricingDate + '\'' +
"updateTime='" + updateTime + '\'' +
"orderHeaderId='" + orderHeaderId + '\'' +
"sourceHeaderNumber='" + sourceHeaderNumber + '\'' +
'}';
"orderNumber='" + orderNumber + '\'' +
"orderDate='" + orderDate + '\'' +
"sellerId='" + sellerId + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class SysDictItem implements Serializable {
private static final long serialVersionUID = 1571714552031L;
/**
* 主键
*
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 字典id
* isNullAble:1
*/
@JSONField(name = "dict_id")
private String dictId;
/**
* 字典项文本
* isNullAble:1
*/
@JSONField(name = "item_text")
private String itemText;
/**
* 字典项值
* isNullAble:1
*/
@JSONField(name = "item_value")
private String itemValue;
/**
* 描述
* isNullAble:1
*/
@JSONField(name = "description")
private String description;
/**
* 排序
* isNullAble:1
*/
@JSONField(name = "sort_order")
private Integer sortOrder;
/**
* 状态(1启用 0不启用)
* isNullAble:1
*/
@JSONField(name = "status")
private Integer status;
/**
*
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
*
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime createTime;
/**
*
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
*
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setDictId(String dictId){this.dictId = dictId;}
public String getDictId(){return this.dictId;}
public void setItemText(String itemText){this.itemText = itemText;}
public String getItemText(){return this.itemText;}
public void setItemValue(String itemValue){this.itemValue = itemValue;}
public String getItemValue(){return this.itemValue;}
public void setDescription(String description){this.description = description;}
public String getDescription(){return this.description;}
public void setSortOrder(Integer sortOrder){this.sortOrder = sortOrder;}
public Integer getSortOrder(){return this.sortOrder;}
public void setStatus(Integer status){this.status = status;}
public Integer getStatus(){return this.status;}
public void setCreateBy(String createBy){this.createBy = createBy;}
public String getCreateBy(){return this.createBy;}
public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}
public java.time.LocalDateTime getCreateTime(){return this.createTime;}
public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
public String getUpdateBy(){return this.updateBy;}
public void setUpdateTime(java.time.LocalDateTime updateTime){this.updateTime = updateTime;}
public java.time.LocalDateTime getUpdateTime(){return this.updateTime;}
@Override
public String toString() {
return "SysDictItem{" +
"id='" + id + '\'' +
"dictId='" + dictId + '\'' +
"itemText='" + itemText + '\'' +
"itemValue='" + itemValue + '\'' +
"description='" + description + '\'' +
"sortOrder='" + sortOrder + '\'' +
"status='" + status + '\'' +
"createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' +
"updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class TempAreaFomPmp implements Serializable {
private static final long serialVersionUID = 1571815161257L;
/**
* 主键
*
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 仓号代码
* isNullAble:1
*/
@JSONField(name = "wh")
private String wh;
/**
* 区域代码
* isNullAble:1
*/
@JSONField(name = "subwh")
private String subwh;
/**
* 仓号名称
* isNullAble:1
*/
@JSONField(name = "descript")
private String descript;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setWh(String wh){this.wh = wh;}
public String getWh(){return this.wh;}
public void setSubwh(String subwh){this.subwh = subwh;}
public String getSubwh(){return this.subwh;}
public void setDescript(String descript){this.descript = descript;}
public String getDescript(){return this.descript;}
@Override
public String toString() {
return "TempAreaFomPmp{" +
"id='" + id + '\'' +
"wh='" + wh + '\'' +
"subwh='" + subwh + '\'' +
"descript='" + descript + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class TempInventoryFomPmp implements Serializable {
private static final long serialVersionUID = 1571812713184L;
/**
* 主键
*
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 仓号代码
* isNullAble:1
*/
@JSONField(name = "code")
private String code;
/**
* 仓号名称
* isNullAble:1
*/
@JSONField(name = "descript")
private String descript;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setCode(String code){this.code = code;}
public String getCode(){return this.code;}
public void setDescript(String descript){this.descript = descript;}
public String getDescript(){return this.descript;}
@Override
public String toString() {
return "TempInventoryFomPmp{" +
"id='" + id + '\'' +
"code='" + code + '\'' +
"descript='" + descript + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class TempItemFomPmp implements Serializable {
private static final long serialVersionUID = 1571816179115L;
/**
* 主键
* 主键
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 货号,唯一标识
* isNullAble:0
*/
@JSONField(name = "plucode")
private String plucode;
/**
* 商品类型 0:图书;2:其他商品;3:音像;
* isNullAble:0
*/
@JSONField(name = "pystype")
private Integer pystype;
/**
* ISBN
* isNullAble:0
*/
@JSONField(name = "isbn")
private String isbn;
/**
* 扫描码
* isNullAble:0
*/
@JSONField(name = "scancode")
private String scancode;
/**
* 商品名称
* isNullAble:0
*/
@JSONField(name = "title")
private String title;
/**
* 商品简拼
* isNullAble:1
*/
@JSONField(name = "jp")
private String jp;
/**
* 商品价格
* isNullAble:0
*/
@JSONField(name = "price")
private java.math.BigDecimal price;
/**
* 营销分类
* isNullAble:0
*/
@JSONField(name = "clscode")
private String clscode;
/**
* 分类名称
* isNullAble:1
*/
@JSONField(name = "clsname")
private String clsname;
/**
* 出版商
* isNullAble:1
*/
@JSONField(name = "publisher")
private String publisher;
/**
* 出版社简称
* isNullAble:1
*/
@JSONField(name = "pubname")
private String pubname;
/**
* 出版日期
* isNullAble:1
*/
@JSONField(name = "pubdate")
private java.time.LocalDateTime pubdate;
/**
* 部类
* isNullAble:1
*/
@JSONField(name = "dptcode")
private String dptcode;
/**
* 部类名称
* isNullAble:1
*/
@JSONField(name = "dptname")
private String dptname;
/**
* 系列
* isNullAble:1
*/
@JSONField(name = "series")
private String series;
/**
* 作者
* isNullAble:1
*/
@JSONField(name = "author")
private String author;
/**
* 读者
* isNullAble:1
*/
@JSONField(name = "reader")
private String reader;
/**
* 首次进货日期
* isNullAble:1
*/
@JSONField(name = "fstdate")
private java.time.LocalDateTime fstdate;
/**
* 首次进货折扣
* isNullAble:1
*/
@JSONField(name = "fstdisc")
private java.math.BigDecimal fstdisc;
/**
* 末次进货折扣
* isNullAble:1
*/
@JSONField(name = "lstdisc")
private java.math.BigDecimal lstdisc;
/**
* 最大进货折扣
* isNullAble:1
*/
@JSONField(name = "maxdisc")
private java.math.BigDecimal maxdisc;
/**
* 最小进货折扣
* isNullAble:1
*/
@JSONField(name = "mindisc")
private java.math.BigDecimal mindisc;
/**
* 供商代码
* isNullAble:1
*/
@JSONField(name = "vendor")
private String vendor;
/**
* transtitle
* isNullAble:1
*/
@JSONField(name = "transtitle")
private String transtitle;
/**
* 税率
* isNullAble:1
*/
@JSONField(name = "inctax")
private Integer inctax;
/**
* 原币价格
* isNullAble:1
*/
@JSONField(name = "originprice")
private java.math.BigDecimal originprice;
/**
* 币种
* isNullAble:1
*/
@JSONField(name = "currency")
private String currency;
/**
* 0表示新数据1表示已同步erp
* isNullAble:1
*/
@JSONField(name = "status")
private Integer status;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setPlucode(String plucode){this.plucode = plucode;}
public String getPlucode(){return this.plucode;}
public void setPystype(Integer pystype){this.pystype = pystype;}
public Integer getPystype(){return this.pystype;}
public void setIsbn(String isbn){this.isbn = isbn;}
public String getIsbn(){return this.isbn;}
public void setScancode(String scancode){this.scancode = scancode;}
public String getScancode(){return this.scancode;}
public void setTitle(String title){this.title = title;}
public String getTitle(){return this.title;}
public void setJp(String jp){this.jp = jp;}
public String getJp(){return this.jp;}
public void setPrice(java.math.BigDecimal price){this.price = price;}
public java.math.BigDecimal getPrice(){return this.price;}
public void setClscode(String clscode){this.clscode = clscode;}
public String getClscode(){return this.clscode;}
public void setClsname(String clsname){this.clsname = clsname;}
public String getClsname(){return this.clsname;}
public void setPublisher(String publisher){this.publisher = publisher;}
public String getPublisher(){return this.publisher;}
public void setPubname(String pubname){this.pubname = pubname;}
public String getPubname(){return this.pubname;}
public void setPubdate(java.time.LocalDateTime pubdate){this.pubdate = pubdate;}
public java.time.LocalDateTime getPubdate(){return this.pubdate;}
public void setDptcode(String dptcode){this.dptcode = dptcode;}
public String getDptcode(){return this.dptcode;}
public void setDptname(String dptname){this.dptname = dptname;}
public String getDptname(){return this.dptname;}
public void setSeries(String series){this.series = series;}
public String getSeries(){return this.series;}
public void setAuthor(String author){this.author = author;}
public String getAuthor(){return this.author;}
public void setReader(String reader){this.reader = reader;}
public String getReader(){return this.reader;}
public void setFstdate(java.time.LocalDateTime fstdate){this.fstdate = fstdate;}
public java.time.LocalDateTime getFstdate(){return this.fstdate;}
public void setFstdisc(java.math.BigDecimal fstdisc){this.fstdisc = fstdisc;}
public java.math.BigDecimal getFstdisc(){return this.fstdisc;}
public void setLstdisc(java.math.BigDecimal lstdisc){this.lstdisc = lstdisc;}
public java.math.BigDecimal getLstdisc(){return this.lstdisc;}
public void setMaxdisc(java.math.BigDecimal maxdisc){this.maxdisc = maxdisc;}
public java.math.BigDecimal getMaxdisc(){return this.maxdisc;}
public void setMindisc(java.math.BigDecimal mindisc){this.mindisc = mindisc;}
public java.math.BigDecimal getMindisc(){return this.mindisc;}
public void setVendor(String vendor){this.vendor = vendor;}
public String getVendor(){return this.vendor;}
public void setTranstitle(String transtitle){this.transtitle = transtitle;}
public String getTranstitle(){return this.transtitle;}
public void setInctax(Integer inctax){this.inctax = inctax;}
public Integer getInctax(){return this.inctax;}
public void setOriginprice(java.math.BigDecimal originprice){this.originprice = originprice;}
public java.math.BigDecimal getOriginprice(){return this.originprice;}
public void setCurrency(String currency){this.currency = currency;}
public String getCurrency(){return this.currency;}
public void setStatus(Integer status){this.status = status;}
public Integer getStatus(){return this.status;}
@Override
public String toString() {
return "TempItemFomPmp{" +
"id='" + id + '\'' +
"plucode='" + plucode + '\'' +
"pystype='" + pystype + '\'' +
"isbn='" + isbn + '\'' +
"scancode='" + scancode + '\'' +
"title='" + title + '\'' +
"jp='" + jp + '\'' +
"price='" + price + '\'' +
"clscode='" + clscode + '\'' +
"clsname='" + clsname + '\'' +
"publisher='" + publisher + '\'' +
"pubname='" + pubname + '\'' +
"pubdate='" + pubdate + '\'' +
"dptcode='" + dptcode + '\'' +
"dptname='" + dptname + '\'' +
"series='" + series + '\'' +
"author='" + author + '\'' +
"reader='" + reader + '\'' +
"fstdate='" + fstdate + '\'' +
"fstdisc='" + fstdisc + '\'' +
"lstdisc='" + lstdisc + '\'' +
"maxdisc='" + maxdisc + '\'' +
"mindisc='" + mindisc + '\'' +
"vendor='" + vendor + '\'' +
"transtitle='" + transtitle + '\'' +
"inctax='" + inctax + '\'' +
"originprice='" + originprice + '\'' +
"currency='" + currency + '\'' +
"status='" + status + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class TempItemSkuFomPmp implements Serializable {
private static final long serialVersionUID = 1571990401367L;
/**
* 主键
*
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 架号
* isNullAble:1
*/
@JSONField(name = "rack")
private String rack;
/**
* 货号
* isNullAble:1
*/
@JSONField(name = "plucode")
private String plucode;
/**
* 货名
* isNullAble:1
*/
@JSONField(name = "title")
private String title;
/**
* 价格
* isNullAble:1
*/
@JSONField(name = "price")
private java.math.BigDecimal price;
/**
* 可请配数量
* isNullAble:1
*/
@JSONField(name = "qty")
private Integer qty;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setRack(String rack){this.rack = rack;}
public String getRack(){return this.rack;}
public void setPlucode(String plucode){this.plucode = plucode;}
public String getPlucode(){return this.plucode;}
public void setTitle(String title){this.title = title;}
public String getTitle(){return this.title;}
public void setPrice(java.math.BigDecimal price){this.price = price;}
public java.math.BigDecimal getPrice(){return this.price;}
public void setQty(Integer qty){this.qty = qty;}
public Integer getQty(){return this.qty;}
@Override
public String toString() {
return "TempItemSkuFomPmp{" +
"id='" + id + '\'' +
"rack='" + rack + '\'' +
"plucode='" + plucode + '\'' +
"title='" + title + '\'' +
"price='" + price + '\'' +
"qty='" + qty + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class TempLocatorFomPmp implements Serializable {
private static final long serialVersionUID = 1571813472253L;
/**
* 主键
*
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 架号代码
* isNullAble:1
*/
@JSONField(name = "code")
private String code;
/**
* 仓号代码
* isNullAble:1
*/
@JSONField(name = "wh")
private String wh;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setCode(String code){this.code = code;}
public String getCode(){return this.code;}
public void setWh(String wh){this.wh = wh;}
public String getWh(){return this.wh;}
@Override
public String toString() {
return "TempLocatorFomPmp{" +
"id='" + id + '\'' +
"code='" + code + '\'' +
"wh='" + wh + '\'' +
'}';
}
}
......@@ -69,7 +69,7 @@ public class InvItemRfidService {
invItemRfid.setCreate_by(sysAccessToken.getUserName());
invItemRfid.setCreate_time(LocalDateTime.now());
// invItemRfid.setRfid(String.format("%016d", num));
invItemRfid.setRfid(UuidUtil.GetRandomString(16));
invItemRfid.setRfid(getRfid());
invItemRfid.setStaust("CREATED");
invItemRfidMapper.insert(invItemRfid);
num=num+1;
......@@ -79,7 +79,7 @@ public class InvItemRfidService {
invItemRfid.setId(UuidUtil.get32UUIDString());
invItemRfid.setCreate_by(sysAccessToken.getUserName());
invItemRfid.setCreate_time(LocalDateTime.now());
invItemRfid.setRfid(UuidUtil.GetRandomString(16));
invItemRfid.setRfid(getRfid());
invItemRfid.setStaust("CREATED");
invItemRfidMapper.insert(invItemRfid);
num=num+1;
......@@ -103,7 +103,7 @@ public class InvItemRfidService {
public String getrfid() {
while (true){
String date = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
String date = new SimpleDateFormat("yyMMddHHmmss").format(new Date());
String rfid = date+getsjs();
List<InvItemRfid> invItemRfids = invItemRfidMapper.selectByRfid(rfid);
if(invItemRfids==null||invItemRfids.size()<=0){
......@@ -113,6 +113,11 @@ public class InvItemRfidService {
}
public String getRfid() {
String date = new SimpleDateFormat("yyMMdd").format(new Date());
return date+UuidUtil.GetRandomString(10);
}
@Autowired
private Environment env;
......
......@@ -117,4 +117,13 @@ public class StringUtil {
}
return tempBuilder.reverse().toString();
}
/**
* 获取时间戳(匹配书城)
* @return 时间戳
*/
public static long getTimestamp() {
long milli = System.currentTimeMillis() + 8*3600*1000;
return (milli*10000)+621355968000000000L;
}
}
package orthopedics.vo;
import orthopedics.model.InvCountLine;
import orthopedics.model.InvItemBalanceSummaryV;
public class FindByCountNumberToSku extends InvItemBalanceSummaryV {
private InvCountLine invCountLine;
public InvCountLine getInvCountLine() {
return invCountLine;
}
public void setInvCountLine(InvCountLine invCountLine) {
this.invCountLine = invCountLine;
}
}
package orthopedics.vo;
import orthopedics.model.InvCountPrint;
import orthopedics.model.InvCountPrintLine;
import java.util.List;
public class InvCountPrintPage extends InvCountPrint {
private List<InvCountPrintLine> invCountPrintLines;
public List<InvCountPrintLine> getInvCountPrintLines() {
return invCountPrintLines;
}
public void setInvCountPrintLines(List<InvCountPrintLine> invCountPrintLines) {
this.invCountPrintLines = invCountPrintLines;
}
}
package orthopedics.vo;
import orthopedics.model.RcvParameter;
public class RcvParameterPage extends RcvParameter {
private String subinvCode;
private String locatorCode;
public String getSubinvCode() {
return subinvCode;
}
public void setSubinvCode(String subinvCode) {
this.subinvCode = subinvCode;
}
public String getLocatorCode() {
return locatorCode;
}
public void setLocatorCode(String locatorCode) {
this.locatorCode = locatorCode;
}
}
......@@ -8,14 +8,11 @@ import java.util.Map;
public class Demo {
public static void main(String[] args) {
String s = MD5Util.MD5Encode("test","utf-8");
System.err.println(s);
Map map=new HashMap();
map.put("UserID","");
map.put("Password","");
map.put("TempEncryptKey","");
map.put("Timestamp","");
map.put("MD5","");
// HttpUtil.post()
System.err.println("789");
if(1 % 10000 == 0){
System.err.println("123");
}
}
}
package orthopedics.test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class RedisTest {
@Autowired
private RedisTemplate redisTemplate;
// @Test
// public void demo1(){
// redisTemplate.opsForValue().set("x","yy");
// String x = (String) redisTemplate.opsForValue().get("x");
// System.err.println(x);
// }
}
package orthopedics.test;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Update;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import orthopedics.dao.*;
import orthopedics.model.*;
import orthopedics.service.PropertiesServer;
import orthopedics.service.UserServer;
import orthopedics.util.*;
import java.sql.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.Date;
/**
* 将pmp的数据同步到erp临时表
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class SyncPMPTest {
@Autowired
private UserServer userServer;
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private PropertiesServer propertiesServer;
@Autowired
private SysUserDepartMapper sysUserDepartMapper;
@Autowired
private InvItemMapper invItemMapper;
@Autowired
private InvItemSkuMapper invItemSkuMapper;
@Autowired
private InvItemAttributeMapper invItemAttributeMapper;
@Autowired
private InvItemPmpMapper invItemPmpMapper;
public static long getTimestamp() {
long milli = System.currentTimeMillis() + 8*3600*1000;
return (milli*10000)+621355968000000000L;
}
public Result getPMPInvItemTest(String access_token, String sta, String end) {
SysAccessToken sysAccessToken = userServer.checkToken(access_token);
String gettoken = HttpUtilRSA.getToken();
if(StringUtil.isEmpty(gettoken)){
return new Result(false, StatusCode.ERROR,"获取PMP系统token失败");
}
JSONObject jsonObject = JSONObject.parseObject(gettoken);
String token = jsonObject.getString("Token");
String tempEncryptKey = jsonObject.getString("TempEncryKey");
JSONObject data=new JSONObject();
data.put("uniquekey","获取商品资料列表");
data.put("timestamp", getTimestamp());
data.put("begintime",sta);
data.put("endTime",end);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
try {
byte[] bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
Object result = object.get("result");
if(result==null||!result.equals("success")){
return new Result(false,StatusCode.ERROR,"获取商品信息失败");
}
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
for (JSONObject item:retMsg) {
//检测是否是重复数据
String plucode = item.getString("PLUCODE");
if(StringUtil.isEmpty(plucode)){
continue;
}
List<InvItem> invItems = invItemMapper.selectByPlucode(plucode);
if(invItems!=null&&invItems.size()>0){
continue;
}
InvItem invItem=new InvItem();
InvItemAttribute invItemAttribute=new InvItemAttribute();
InvItemSku invItemSku=new InvItemSku();
InvItemPmp invItemPmp=new InvItemPmp();
//商品表
invItem.setId(UuidUtil.get32UUIDString());
invItem.setOrgId("964daee94b604cd58e5e6bf48dd9670a");
invItem.setStatus("SALE");
String itemCode = propertiesServer.generateFlowingWater("ITEM_SERIAL");
if(StringUtil.isEmpty(itemCode)){
invItem.setItemCode(UuidUtil.get32UUIDString());
}else{
invItem.setItemCode(itemCode);
}
invItem.setItemName(item.getString("TITLE"));
invItem.setProType("14");
invItem.setItemDesc(item.getString("JP"));
invItem.setPystype(item.getString("PYSTYPE"));
invItem.setIsbn(item.getString("ISBN"));
invItem.setPlucode(item.getString("PLUCODE"));
invItem.setScancode(item.getString("SCANCODE"));
invItem.setExtcode("0");
invItem.setPurchasePrice(item.getString("PRICE"));
invItem.setGeneralName(item.getString("CLSCODE"));
invItem.setManufacturerId(item.getString("PUBLISHER"));
if(!StringUtil.isEmpty(item.getDate("PUBDATE"))){
invItem.setSpecification(item.getDate("PUBDATE").toInstant()
.atZone( ZoneId.systemDefault() )
.toLocalDateTime());
}
invItem.setPrimaryUnit("BEN");
if(item.getString("PYSTYPE").equals("0")||item.getString("PYSTYPE").equals("4")){
invItem.setAttribute1("Book");
invItem.setIsBorrow("Y");
}else{
invItem.setAttribute1("Goods");
invItem.setIsBorrow("N");
}
invItem.setAttribute2("A");
invItem.setTax(item.getString("INCTAX"));
invItem.setDefaultVendorId("000000006c60dba1016c60f839270004");
invItem.setCreateBy(sysAccessToken.getUserName());
invItem.setCreateTime(LocalDateTime.now());
//查询当前用户部门
SysUserDepart sysUserDepart = sysUserDepartMapper.selectByUserId(sysAccessToken.getUserId());
//图书信息
invItemAttribute.setId(UuidUtil.get32UUIDString());
invItemAttribute.setCreateBy(sysAccessToken.getUserName());
invItemAttribute.setCreateTime(LocalDateTime.now());
if(sysUserDepart!=null){
invItemAttribute.setSysOrgCode(sysUserDepart.getDepId());
}
invItemAttribute.setItemId(invItem.getId());
invItemAttribute.setItemCode(invItem.getItemCode());
invItemAttribute.setAuthor(item.getString("AUTHOR"));
invItemAttribute.setReader(item.getString("READER"));
//商品SKU映射
invItemSku.setId(UuidUtil.get32UUIDString());
if(sysUserDepart!=null){
invItemSku.setSysOrgCode(sysUserDepart.getDepId());
}
invItemSku.setOrgId("964daee94b604cd58e5e6bf48dd9670a");
invItemSku.setExternal("PMP");
invItemSku.setItemSku(item.getString("PLUCODE"));
invItemSku.setItemName(invItem.getItemName());
invItemSku.setItemCode(invItem.getItemCode());
invItemSku.setItemDesc(invItem.getItemDesc());
invItemSku.setStatus("A");
invItemSku.setCreateBy(sysAccessToken.getUserName());
invItemSku.setCreateTime(LocalDateTime.now());
//pmp商品缓存表
invItemPmp.setId(UuidUtil.get32UUIDString());
invItemPmp.setPlucode(item.getString("PLUCODE"));
invItemPmp.setPystype(item.getInteger("PYSTYPE"));
invItemPmp.setIsbn(item.getString("ISBN"));
invItemPmp.setScancode(item.getString("SCANCODE"));
invItemPmp.setTitle(item.getString("TITLE"));
invItemPmp.setJp(item.getString("JP"));
invItemPmp.setPrice(item.getBigDecimal("PRICE"));
invItemPmp.setClscode(item.getString("CLSCODE"));
invItemPmp.setClsname(item.getString("CLSNAME"));
invItemPmp.setPublisher(item.getString("PUBLISHER"));
invItemPmp.setPubname(item.getString("PUBNAME"));
if(!StringUtil.isEmpty(item.getDate("PUBDATE"))){
invItemPmp.setPubdate(item.getDate("PUBDATE").toInstant()
.atZone( ZoneId.systemDefault() )
.toLocalDateTime());
}
invItemPmp.setDptcode(item.getString("DPTCODE"));
invItemPmp.setDptname(item.getString("DPTNAME"));
invItemPmp.setSeries(item.getString("SERIES"));
invItemPmp.setAuthor(item.getString("AUTHOR"));
invItemPmp.setReader(item.getString("READER"));
if(!StringUtil.isEmpty(item.getDate("FSTDATE"))){
invItemPmp.setFstdate(item.getDate("FSTDATE").toInstant()
.atZone( ZoneId.systemDefault() )
.toLocalDateTime());
}
invItemPmp.setFstdisc(item.getBigDecimal("FSTDISC"));
invItemPmp.setLstdisc(item.getBigDecimal("LSTDISC"));
invItemPmp.setMaxdisc(item.getBigDecimal("MAXDISC"));
invItemPmp.setMindisc(item.getBigDecimal("MINDISC"));
invItemPmp.setVendor(item.getString("VENDOR"));
invItemPmp.setTranstitle(item.getString("TRANSTITLE"));
invItemPmp.setInctax(item.getInteger("INCTAX"));
invItemPmp.setOriginprice(item.getBigDecimal("ORIGINPRICE"));
invItemPmp.setCurrency(item.getString("CURRENCY"));
invItemPmp.setStatus(1);
invItemMapper.insert(invItem);
invItemSkuMapper.insert(invItemSku);
invItemAttributeMapper.insert(invItemAttribute);
invItemPmpMapper.insert(invItemPmp);
}
return new Result(true,StatusCode.OK,"获取商品信息成功");
} catch (Exception e) {
}
return new Result(false,StatusCode.ERROR,"获取商品信息失败");
}
//获取一年后的时间
public String getDate1(String str) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = sdf.parse(str);
Calendar cal = Calendar.getInstance();
cal.setTime(parse);
cal.add(Calendar.DATE, 10);//增加5年
return sdf.format(cal.getTime());
}
/**
* 获取pmp商品同步到临时表
*/
@Autowired
private TempItemFomPmpMapper tempItemFomPmpMapper;
@Test
public void getPMPHistoryInvItem(){
String sta = null;
String end = null;
String begintime= (String) redisTemplate.opsForValue().get("getPMPInvItem");
SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
if(StringUtil.isEmpty(begintime)){
sta = "1995-1-1 00:00:00";
}else{
sta = begintime;
}
try {
Date parse = sdf.parse(sta);
long time = parse.getTime();
while (time<=new Date().getTime()){
end = getDate1(sta);
String gettoken = HttpUtilRSA.getToken();
JSONObject jsonObject = JSONObject.parseObject(gettoken);
String token = jsonObject.getString("Token");
String tempEncryptKey = jsonObject.getString("TempEncryKey");
JSONObject data=new JSONObject();
data.put("uniquekey","获取商品资料列表");
data.put("timestamp", getTimestamp());
data.put("begintime",sta);
data.put("endTime",end);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
System.err.println(sta+"获取到"+retMsg.size()+"条商品");
if(retMsg.size()<=0){
redisTemplate.opsForValue().set("getPMPInvItem",end);
System.err.println(sta+"同步了"+retMsg.size()+"条商品");
sta = end;
continue;
}
List<TempItemFomPmp> tempItemFomPmpList=new ArrayList<>();
for (JSONObject item:retMsg){
TempItemFomPmp invItemPmp=new TempItemFomPmp();
//pmp商品缓存表
invItemPmp.setId(UuidUtil.get32UUIDString());
invItemPmp.setPlucode(item.getString("PLUCODE"));
invItemPmp.setPystype(item.getInteger("PYSTYPE"));
invItemPmp.setIsbn(item.getString("ISBN"));
invItemPmp.setScancode(item.getString("SCANCODE"));
invItemPmp.setTitle(item.getString("TITLE"));
invItemPmp.setJp(item.getString("JP"));
invItemPmp.setPrice(item.getBigDecimal("PRICE"));
invItemPmp.setClscode(item.getString("CLSCODE"));
invItemPmp.setClsname(item.getString("CLSNAME"));
invItemPmp.setPublisher(item.getString("PUBLISHER"));
invItemPmp.setPubname(item.getString("PUBNAME"));
if(!StringUtil.isEmpty(item.getDate("PUBDATE"))){
invItemPmp.setPubdate(item.getDate("PUBDATE").toInstant()
.atZone( ZoneId.systemDefault() )
.toLocalDateTime());
}
invItemPmp.setDptcode(item.getString("DPTCODE"));
invItemPmp.setDptname(item.getString("DPTNAME"));
invItemPmp.setSeries(item.getString("SERIES"));
invItemPmp.setAuthor(item.getString("AUTHOR"));
invItemPmp.setReader(item.getString("READER"));
if(!StringUtil.isEmpty(item.getDate("FSTDATE"))){
invItemPmp.setFstdate(item.getDate("FSTDATE").toInstant()
.atZone( ZoneId.systemDefault() )
.toLocalDateTime());
}
invItemPmp.setFstdisc(item.getBigDecimal("FSTDISC"));
invItemPmp.setLstdisc(item.getBigDecimal("LSTDISC"));
invItemPmp.setMaxdisc(item.getBigDecimal("MAXDISC"));
invItemPmp.setMindisc(item.getBigDecimal("MINDISC"));
invItemPmp.setVendor(item.getString("VENDOR"));
invItemPmp.setTranstitle(item.getString("TRANSTITLE"));
invItemPmp.setInctax(item.getInteger("INCTAX"));
invItemPmp.setOriginprice(item.getBigDecimal("ORIGINPRICE"));
invItemPmp.setCurrency(item.getString("CURRENCY"));
invItemPmp.setStatus(1);
tempItemFomPmpList.add(invItemPmp);
// if(i % 10000 == 0){
// tempItemFomPmpMapper.insertBatch(tempItemFomPmpList);
// System.err.println("同步了"+i+"条商品");
// tempItemFomPmpList.clear();
// }
}
tempItemFomPmpMapper.insertBatch(tempItemFomPmpList);
// getPMPInvItemTest(access_token,sta,end);
redisTemplate.opsForValue().set("getPMPInvItem",end);
System.err.println(sta+"同步了"+retMsg.size()+"条商品");
sta = end;
}
}catch (Exception e){
//logger.error("pmp同步失败时间段"+sta+"---"+end);
System.err.println(e.getMessage());
System.err.println("pmp同步失败时间段"+sta+"---"+end);
}
}
@Autowired
private TempInventoryFomPmpMapper tempInventoryFomPmpMapper;
/**
* 获取pmp仓号同步到临时表
*/
@Test
public void tempInventoryFomPmp(){
String gettoken = HttpUtilRSA.getToken();
System.err.println(gettoken);
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
data.put("uniquekey","获取仓号列表");
data.put("timestamp", getTimestamp());
System.err.println(new Date());
//data.put("begintime","1995-12-23 00:00:00");
// data.put("begintime","2015-01-11 18:00:00");
// data.put("endTime","2020-06-12 18:00:00");
Map headers=new HashMap();
headers.put("Content-Type","application/json");
headers.put("token",token);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = new byte[0];
try {
bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
} catch (Exception e) {
e.printStackTrace();
}
//String post = HttpUtilPMP.post("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", data, headers, 6000, 6000, "utf-8",tempEncryptKey);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
System.err.println(retMsg);
System.err.println(retMsg.size());
List<TempInventoryFomPmp> tempInventoryFomPmpList=new ArrayList<>();
for(JSONObject jsonObject:retMsg){
TempInventoryFomPmp tempInventoryFomPmp=new TempInventoryFomPmp();
String code = jsonObject.getString("code");
String descript = jsonObject.getString("descript");
tempInventoryFomPmp.setId(UuidUtil.get32UUIDString());
tempInventoryFomPmp.setCode(code);
tempInventoryFomPmp.setDescript(descript);
tempInventoryFomPmpList.add(tempInventoryFomPmp);
}
tempInventoryFomPmpMapper.insertBatch(tempInventoryFomPmpList);
}
@Autowired
private TempLocatorFomPmpMapper tempLocatorFomPmpMapper;
/**
* 获取pmp货架号同步到临时表
*/
@Test
public void tempLocatorFomPmp(){
String gettoken = HttpUtilRSA.getToken();
System.err.println(gettoken);
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
data.put("uniquekey","获取架号列表");
data.put("timestamp", getTimestamp());
System.err.println(new Date());
//data.put("begintime","1995-12-23 00:00:00");
// data.put("begintime","2015-01-11 18:00:00");
// data.put("endTime","2020-06-12 18:00:00");
Map headers=new HashMap();
headers.put("Content-Type","application/json");
headers.put("token",token);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = new byte[0];
try {
bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
} catch (Exception e) {
e.printStackTrace();
}
//String post = HttpUtilPMP.post("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", data, headers, 6000, 6000, "utf-8",tempEncryptKey);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
System.err.println(retMsg);
System.err.println(retMsg.size());
List<TempLocatorFomPmp> tempInventoryFomPmpList=new ArrayList<>();
for(JSONObject jsonObject:retMsg){
TempLocatorFomPmp tempLocatorFomPmp=new TempLocatorFomPmp();
String code = jsonObject.getString("code");
String wh = jsonObject.getString("wh");
tempLocatorFomPmp.setId(UuidUtil.get32UUIDString());
tempLocatorFomPmp.setCode(code);
tempLocatorFomPmp.setWh(wh);
tempInventoryFomPmpList.add(tempLocatorFomPmp);
}
tempLocatorFomPmpMapper.insertBatch(tempInventoryFomPmpList);
}
@Autowired
private TempAreaFomPmpMapper tempAreaFomPmpMapper;
/**
* 获取pmp区域同步到临时表
*/
@Test
public void tempAreaFomPmp(){
String gettoken = HttpUtilRSA.getToken();
System.err.println(gettoken);
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
data.put("uniquekey","获取区域列表");
data.put("timestamp", getTimestamp());
System.err.println(new Date());
//data.put("begintime","1995-12-23 00:00:00");
// data.put("begintime","2015-01-11 18:00:00");
// data.put("endTime","2020-06-12 18:00:00");
Map headers=new HashMap();
headers.put("Content-Type","application/json");
headers.put("token",token);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = new byte[0];
try {
bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
} catch (Exception e) {
e.printStackTrace();
}
//String post = HttpUtilPMP.post("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", data, headers, 6000, 6000, "utf-8",tempEncryptKey);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
System.err.println(retMsg);
System.err.println(retMsg.size());
List<TempAreaFomPmp> tempInventoryFomPmpList=new ArrayList<>();
for(JSONObject jsonObject:retMsg){
TempAreaFomPmp tempAreaFomPmp=new TempAreaFomPmp();
String subwh = jsonObject.getString("subwh");
String wh = jsonObject.getString("wh");
String descript = jsonObject.getString("descript");
tempAreaFomPmp.setId(UuidUtil.get32UUIDString());
tempAreaFomPmp.setSubwh(subwh);
tempAreaFomPmp.setWh(wh);
tempAreaFomPmp.setDescript(descript);
tempInventoryFomPmpList.add(tempAreaFomPmp);
}
tempAreaFomPmpMapper.insertBatch(tempInventoryFomPmpList);
}
/**
* 将ERP创建的商品同步到POS
*/
@Test
public void invItemsToPos(){
List<InvItem> invItems = invItemMapper.findByAttribute2();
if(invItems!=null && invItems.size()>0){
Connection ct=null;
PreparedStatement ps=null;
ResultSet rs=null;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
ct= DriverManager.getConnection("jdbc:sqlserver://130.1.0.32:1433;DatabaseName=shoptxns","wjkj","wjkj123456");
for (InvItem invItem:invItems) {
ps=ct.prepareStatement("insert into plu values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,invItem.getItemCode());
ps.setString(2,invItem.getItemName());
//ps.setString(3,invItem.getAttribute1());
ps.setString(3,"");
ps.setString(4,"");
ps.setString(5,"");
ps.setString(6,"");
ps.setInt(7,(int)(Float.parseFloat("12.56")*100));
ps.setInt(8,0);
ps.setInt(9,(int)(Float.parseFloat("12.56")*100));
ps.setInt(10,(int)(Float.parseFloat("12.56")*100));
ps.setInt(11,(int)(Float.parseFloat("12.56")*100));
ps.setString(12,"-");
java.sql.Date date = new java.sql.Date(new java.util.Date().getTime()); //构建一个
ps.setDate(13,date);
ps.setInt(14,0);
ps.setString(15,"由erp同步");
ps.setInt(16,Integer.parseInt(invItem.getTax()));
int i = ps.executeUpdate();
if(i==1){
System.err.println("将ERP创建的商品同步到POS成功");
}else{
System.err.println("将ERP创建的商品同步到POS失败");
}
}
} catch (Exception e) {
System.err.println(e.getMessage());
}finally {
try {
if(rs!=null){
rs.close();
}
if(ps!=null){
ps.close();
}
if(ct!=null){
ct.close();
}
} catch (SQLException e) {
System.err.println("将ERP创建的商品同步到POS流关闭异常");
}
}
}
}
@Autowired
private TempItemSkuFomPmpMapper tempItemSkuFomPmpMapper;
/**
* 获取pmp商品库存信息同步到临时表
*/
@Test
public void tempItemSkuFomPmp(){
List<InvItem> select = invItemMapper.select();
String gettoken = HttpUtilRSA.getToken();
String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject();
List<JSONObject> plulist=new ArrayList<>();
for (InvItem invItem:select) {
if(StringUtil.isEmpty(invItem.getPlucode())){
continue;
}
JSONObject jsonObject=new JSONObject();
jsonObject.put("plucode",invItem.getPlucode());
plulist.add(jsonObject);
}
data.put("uniquekey","可配库存查询");
data.put("timestamp", getTimestamp());
data.put("shop", "2");
data.put("plulist",plulist);
Map headers=new HashMap();
headers.put("Content-Type","application/json");
headers.put("token",token);
byte[] encrypt = Aes.encrypt(JSON.toJSONString(data), tempEncryptKey, tempEncryptKey);
byte[] bytes = new byte[0];
try {
bytes = HttpUtilPMP.postBy("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", encrypt,token);
} catch (Exception e) {
e.printStackTrace();
}
//String post = HttpUtilPMP.post("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", data, headers, 6000, 6000, "utf-8",tempEncryptKey);
String s = new String(bytes);
JSONObject object = JSONObject.parseObject(s);
List<JSONObject> retMsg= (List<JSONObject>) object.get("ret_msg");
System.err.println(retMsg);
System.err.println(retMsg.size());
List<TempItemSkuFomPmp> tempItemSkuFomPmps=new ArrayList<>();
for (JSONObject jsonObject:retMsg) {
TempItemSkuFomPmp tempItemSkuFomPmp=new TempItemSkuFomPmp();
tempItemSkuFomPmp.setId(UuidUtil.get32UUIDString());
tempItemSkuFomPmp.setRack(jsonObject.getString("rack"));
tempItemSkuFomPmp.setPlucode(jsonObject.getString("plucode"));
tempItemSkuFomPmp.setTitle(jsonObject.getString("title"));
tempItemSkuFomPmp.setPrice(jsonObject.getBigDecimal("price"));
tempItemSkuFomPmp.setQty(jsonObject.getInteger("qty"));
tempItemSkuFomPmps.add(tempItemSkuFomPmp);
}
tempItemSkuFomPmpMapper.insertBatch(tempItemSkuFomPmps);
}
}
package orthopedics.test;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;
import orthopedics.controller.v1.TransactionController;
import orthopedics.dao.*;
import orthopedics.model.*;
import orthopedics.service.PropertiesServer;
import orthopedics.service.UserServer;
import orthopedics.util.*;
import java.sql.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.*;
/**
* 将临时表数据同步到正式表
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class TempToOfficial {
@Autowired
private TempInventoryFomPmpMapper tempInventoryFomPmpMapper;
@Autowired
private InvInventoryMapper invInventoryMapper;
/**
* temp_inventory_fom_pmp临时表创建库存信息inv_inventory
*/
@Test
public void addInventory(){
List<TempInventoryFomPmp> select = tempInventoryFomPmpMapper.select();
List<InvInventory> invInventories=new ArrayList<>();
int i=0;
for (TempInventoryFomPmp tempInventoryFomPmp:select) {
InvInventory byInvCode = invInventoryMapper.findByInvCode("WH" + tempInventoryFomPmp.getCode());
if(byInvCode!=null){
continue;
}
InvInventory invInventory=new InvInventory();
invInventory.setId(UuidUtil.get32UUIDString());
invInventory.setOrg_id("2c9007626dde3f4f016deda2151f1a42");
invInventory.setInv_code("WH"+tempInventoryFomPmp.getCode());
invInventory.setInv_name(tempInventoryFomPmp.getDescript());
invInventory.setInv_desc("-1");
invInventory.setSortid(tempInventoryFomPmp.getCode());
invInventory.setStatus("A");
invInventory.setCreate_by("0f98872af64711e9a1b10242ac110002");
invInventory.setCreate_time(LocalDateTime.now());
invInventories.add(invInventory);
i++;
invInventoryMapper.insert(invInventory);
}
//invInventoryMapper.insertBatch(invInventories);
System.err.println(i);
}
@Autowired
private TempAreaFomPmpMapper tempAreaFomPmpMapper;
@Autowired
private InvSubinventoryMapper invSubinventoryMapper;
/**
* temp_area_fom_pmp临时表创建库区信息inv_subinventory
*/
@Test
public void addSubinventory(){
List<TempAreaFomPmp> select = tempAreaFomPmpMapper.select();
int i=0;
System.err.println("查询到"+select.size()+"条数据");
for (TempAreaFomPmp tempAreaFomPmp:select) {
InvSubinventory bySubinvCode = invSubinventoryMapper.findBySubinvCode("KQ" + tempAreaFomPmp.getSubwh());
if(bySubinvCode!=null){
continue;
}
InvSubinventory invSubinventory=new InvSubinventory();
invSubinventory.setId(UuidUtil.get32UUIDString());
invSubinventory.setCreateDate(LocalDateTime.now());
invSubinventory.setCreateBy("0f98872af64711e9a1b10242ac110002");
InvInventory bySortid = invInventoryMapper.findBySortid(tempAreaFomPmp.getWh());
if(bySortid==null){
continue;
}
invSubinventory.setInvId(bySortid.getId());
invSubinventory.setSubinvType("STORAGE");
invSubinventory.setSubinvCode("KQ"+tempAreaFomPmp.getSubwh());
invSubinventory.setSubinvName("存储区");
invSubinventory.setSubinvDesc("-1");
invSubinventory.setLocatorControl("Y");
invSubinventory.setStatus("A");
i++;
invSubinventoryMapper.insert(invSubinventory);
}
System.err.println("处理了"+i+"条数据");
}
@Autowired
private TempLocatorFomPmpMapper tempLocatorFomPmpMapper;
@Autowired
private InvLocatorMapper invLocatorMapper;
/**
* temp_locator_fom_pmp临时表创建h货架信息inv_locator
*/
@Test
public void addLocator(){
List<TempLocatorFomPmp> select = tempLocatorFomPmpMapper.select();
int i=0;
System.err.println("查询到"+select.size()+"条数据");
// List<InvLocator> invLocators=new ArrayList<>();
for (TempLocatorFomPmp tempLocatorFomPmp:select) {
List<InvLocator> invLocatorList = invLocatorMapper.selectLocatorByCode("HJ" + tempLocatorFomPmp.getCode());
if(invLocatorList!=null && invLocatorList.size()>0){
continue;
}
InvLocator invLocator=new InvLocator();
invLocator.setId(UuidUtil.get32UUIDString());
invLocator.setCreateBy("0f98872af64711e9a1b10242ac110002");
invLocator.setCreateTime(LocalDateTime.now());
InvInventory bySortid = invInventoryMapper.findBySortid(tempLocatorFomPmp.getWh());
if(bySortid==null){
continue;
}
invLocator.setInvId(bySortid.getId());
List<InvSubinventory> invSubinventories = invSubinventoryMapper.selectByInvIdAndSubinvName(bySortid.getId());
if(invSubinventories==null || invSubinventories.size()<=0){
continue;
}
invLocator.setSubinvId(invSubinventories.get(0).getId());
invLocator.setLocatorCode("HJ"+tempLocatorFomPmp.getCode());
invLocator.setLocatorName(tempLocatorFomPmp.getCode());
invLocator.setLocatorDesc("-1");
invLocator.setStatus("A");
// invLocators.add(invLocator);
invLocatorMapper.insert(invLocator);
i++;
System.err.println("第"+i+"条处理完毕");
}
// invLocatorMapper.insertBatch(invLocators);
System.err.println("处理了"+i+"条数据");
}
@Autowired
private TempItemFomPmpMapper tempItemFomPmpMapper;
@Autowired
private InvItemMapper invItemMapper;
@Autowired
private PropertiesServer propertiesServer;
@Autowired
private SysUserDepartMapper sysUserDepartMapper;
@Autowired
private InvItemSkuMapper invItemSkuMapper;
@Autowired
private InvItemAttributeMapper invItemAttributeMapper;
/**
* 将商品信息从临时表temp_item_fom_pmp同步到正式表inv_item 2683351
*/
@Test
public void addInvItem(){
boolean i=true;
int j=0;
while (i){
List<TempItemFomPmp> limit = tempItemFomPmpMapper.findLimit(j);
System.err.println("查询到"+limit.size()+"条数据");
if(limit.size()<=0){
System.err.println("所有数据同步完成!!!");
return;
}
List<InvItem> invItems=new ArrayList<>();
List<InvItemAttribute> invItemAttributes=new ArrayList<>();
List<InvItemSku> invItemSkus=new ArrayList<>();
for (TempItemFomPmp tempItemFomPmp:limit) {
InvItem plucode = invItemMapper.findByPlucode(tempItemFomPmp.getPlucode());
if(plucode!=null){
continue;
}
InvItem invItem=new InvItem();
InvItemAttribute invItemAttribute=new InvItemAttribute();
InvItemSku invItemSku=new InvItemSku();
//商品表
invItem.setId(UuidUtil.get32UUIDString());
invItem.setOrgId("964daee94b604cd58e5e6bf48dd9670a");
invItem.setStatus("SALE");
invItem.setProType("14");
String newItemCode = invItemMapper.selectTheNewItemCode("14");
String itemCode;
if(newItemCode == null || "".equals(newItemCode)){
itemCode = invItem.getProType() ;
for(int u=0;u<(13-invItem.getProType().length()-1);u++){
itemCode = itemCode + "0";
}
itemCode = itemCode + "1";
}else {
//商品代码加1
itemCode = String.valueOf(Long.parseLong(newItemCode)+1);
}
invItem.setItemCode(itemCode);
invItem.setItemName(tempItemFomPmp.getTitle());
invItem.setItemDesc(tempItemFomPmp.getJp());
invItem.setPystype(tempItemFomPmp.getPystype()+"");
invItem.setIsbn(tempItemFomPmp.getIsbn());
invItem.setPlucode(tempItemFomPmp.getPlucode());
invItem.setScancode(tempItemFomPmp.getScancode());
invItem.setExtcode("0");
invItem.setPurchasePrice(tempItemFomPmp.getPrice()+"");
invItem.setGeneralName(tempItemFomPmp.getClscode());
invItem.setManufacturerId(tempItemFomPmp.getPublisher());
invItem.setSpecification(tempItemFomPmp.getPubdate());
invItem.setPrimaryUnit("BEN");
if(tempItemFomPmp.getPystype()==0||tempItemFomPmp.getPystype()==4){
invItem.setAttribute1("Book");
invItem.setIsBorrow("Y");
}else{
invItem.setAttribute1("Goods");
invItem.setIsBorrow("N");
}
invItem.setAttribute2("A");
invItem.setTax(tempItemFomPmp.getInctax()+"");
invItem.setDefaultVendorId("000000006c60dba1016c60f839270004");
invItem.setCreateBy("PMP同步");
invItem.setCreateTime(LocalDateTime.now());
//查询当前用户部门
SysUserDepart sysUserDepart = sysUserDepartMapper.selectByUserId("b7b819e3a7fb25699ff5e10332f089f7");
//图书信息
invItemAttribute.setId(UuidUtil.get32UUIDString());
invItemAttribute.setCreateBy("PMP同步");
invItemAttribute.setCreateTime(LocalDateTime.now());
if(sysUserDepart!=null){
invItemAttribute.setSysOrgCode(sysUserDepart.getDepId());
}
invItemAttribute.setItemId(invItem.getId());
invItemAttribute.setItemCode(invItem.getItemCode());
invItemAttribute.setAuthor(tempItemFomPmp.getAuthor());
invItemAttribute.setReader(tempItemFomPmp.getReader());
//商品SKU映射
invItemSku.setId(UuidUtil.get32UUIDString());
if(sysUserDepart!=null){
invItemSku.setSysOrgCode(sysUserDepart.getDepId());
}
invItemSku.setOrgId("964daee94b604cd58e5e6bf48dd9670a");
invItemSku.setExternal("PMP");
invItemSku.setItemSku(tempItemFomPmp.getPlucode());
invItemSku.setItemName(invItem.getItemName());
invItemSku.setItemCode(invItem.getItemCode());
invItemSku.setItemDesc(invItem.getItemDesc());
invItemSku.setStatus("A");
invItemSku.setCreateBy("PMP同步");
invItemSku.setCreateTime(LocalDateTime.now());
}
System.err.println("数据封装完成");
invItemMapper.insertBatch(invItems);
invItemSkuMapper.insertBatch(invItemSkus);
invItemAttributeMapper.insertBatch(invItemAttributes);
System.err.println("前"+j+"条同步完成");
j=j+10000;
}
}
@Autowired
private TempItemSkuFomPmpMapper tempItemSkuFomPmpMapper;
@Autowired
private TransactionController transactionController;
/**
* 将商品库存信息从临时表temp_item_sku_fom_pmp同步到正式库存
*/
@Test
public void addInvItemSku(){
List<TempItemSkuFomPmp> select = tempItemSkuFomPmpMapper.select();
int i=0;
for (TempItemSkuFomPmp tempItemSkuFomPmp:select) {
JSONObject jsonObject=new JSONObject();
JSONObject data=new JSONObject();
data.put("inv_code","WH2");
data.put("subinv_code","KQ2");
data.put("locator_code","HJ"+tempItemSkuFomPmp.getRack());
InvItem byPlucode = invItemMapper.findByPlucode(tempItemSkuFomPmp.getPlucode());
data.put("item_code",byPlucode.getItemCode());
data.put("tx_type_code","PMP_SYN");
data.put("tx_date",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
data.put("tx_quantity",tempItemSkuFomPmp.getQty());
data.put("tx_price",tempItemSkuFomPmp.getPrice());
jsonObject.put("data",data);
String s = transactionController.invItemInOut("201910271129039497a78b526d9a246eca0abb1025986f25cG7BHIxhVaDO6MYm", jsonObject);
i++;
System.err.println(i);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment