Commit c99ed9f9 by 肖洋洋

外部接口对接代码

parent 9dc958d4
Showing with 3257 additions and 246 deletions
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId> <artifactId>bcprov-jdk15on</artifactId>
<version>1.47</version> <version>1.47</version>
......
...@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication @SpringBootApplication
@EnableScheduling //@EnableScheduling
public class Application { public class Application {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -17,10 +17,11 @@ import java.text.SimpleDateFormat; ...@@ -17,10 +17,11 @@ import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@Component
public class SyncInvItem { public class SyncInvItem {
private final static Logger logger = LoggerFactory.getLogger(SyncInvItem.class); private final static Logger logger = LoggerFactory.getLogger(SyncInvItem.class);
...@@ -53,11 +54,12 @@ public class SyncInvItem { ...@@ -53,11 +54,12 @@ public class SyncInvItem {
String token = (String) JSONObject.parseObject(gettoken).get("Token"); String token = (String) JSONObject.parseObject(gettoken).get("Token");
String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey"); String tempEncryptKey = (String) JSONObject.parseObject(gettoken).get("TempEncryKey");
JSONObject data=new JSONObject(); JSONObject data=new JSONObject();
data.put("uniquekey","获取商品资料列表"); data.put("uniquekey","获取区域列表");
data.put("timestamp", getTimestamp()); data.put("timestamp", getTimestamp());
System.err.println(new Date()); System.err.println(new Date());
data.put("begintime","1995-12-23 00:00:00"); //data.put("begintime","1995-12-23 00:00:00");
data.put("endTime","1996-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(); Map headers=new HashMap();
headers.put("Content-Type","application/json"); headers.put("Content-Type","application/json");
headers.put("token",token); headers.put("token",token);
...@@ -69,8 +71,12 @@ public class SyncInvItem { ...@@ -69,8 +71,12 @@ public class SyncInvItem {
e.printStackTrace(); e.printStackTrace();
} }
//String post = HttpUtilPMP.post("http://pmpapi.szcbfx.com/api/pmp/ExchangePMPData", data, headers, 6000, 6000, "utf-8",tempEncryptKey); //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; package orthopedics.controller.bookcity;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import orthopedics.dao.InvCategoryMapper; import orthopedics.dao.*;
import orthopedics.dao.InvCountHeaderMapper; import orthopedics.model.*;
import orthopedics.dao.InvCountLineMapper;
import orthopedics.model.InvCountHeader;
import orthopedics.model.InvCountLine;
import orthopedics.model.SysAccessToken;
import orthopedics.service.PropertiesServer; import orthopedics.service.PropertiesServer;
import orthopedics.service.UserServer; import orthopedics.service.UserServer;
import orthopedics.util.Result; import orthopedics.util.Result;
...@@ -18,10 +13,12 @@ import orthopedics.util.StatusCode; ...@@ -18,10 +13,12 @@ import orthopedics.util.StatusCode;
import orthopedics.util.StringUtil; import orthopedics.util.StringUtil;
import orthopedics.util.UuidUtil; import orthopedics.util.UuidUtil;
import orthopedics.vo.InvCountHeaderPage; import orthopedics.vo.InvCountHeaderPage;
import orthopedics.vo.FindByCountNumberToSku;
import java.time.LocalDate; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@RestController @RestController
...@@ -42,14 +39,45 @@ public class InvCountHeaderController { ...@@ -42,14 +39,45 @@ public class InvCountHeaderController {
@Autowired @Autowired
private CheckController checkController; private CheckController checkController;
@Autowired
private HrOrganizationMapper hrOrganizationMapper;
@Autowired
private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper;
@PostMapping("/add") @PostMapping("/add")
@Transactional @Transactional
public Result add(@RequestBody InvCountHeaderPage invCountHeaderPage, @RequestParam(value = "access_token",required = true)String token){ public Result add(@RequestBody InvCountHeaderPage invCountHeaderPage, @RequestParam(value = "access_token",required = true)String token){
if(invCountHeaderPage==null){ if(invCountHeaderPage==null){
return new Result(false, StatusCode.ERROR,"参数为空"); return new Result(false, StatusCode.ERROR,"参数为空");
} }
SysAccessToken sysAccessToken = userServer.checkToken(token); 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(); String uuidString = UuidUtil.get32UUIDString();
//头数据封装 //头数据封装
...@@ -67,12 +95,16 @@ public class InvCountHeaderController { ...@@ -67,12 +95,16 @@ public class InvCountHeaderController {
invCountHeaderPage.setCountDate(LocalDateTime.now()); invCountHeaderPage.setCountDate(LocalDateTime.now());
invCountHeaderPage.setCounter(sysAccessToken.getUserName()); invCountHeaderPage.setCounter(sysAccessToken.getUserName());
invCountHeaderPage.setHeaderStatus("new"); invCountHeaderPage.setHeaderStatus("new");
invCountHeaderPage.setSysOrgCode(s);
//行数据封装 //行数据封装
List<InvCountLine> invCountLineList = invCountHeaderPage.getInvCountLineList(); List<InvCountLine> invCountLineList = invCountHeaderPage.getInvCountLineList();
if(invCountLineList==null||invCountLineList.size()<=0){ if(invCountLineList==null||invCountLineList.size()<=0){
return new Result(false, StatusCode.ERROR,"没有行数据"); return new Result(false, StatusCode.ERROR,"没有行数据");
} }
for (InvCountLine invCountLine:invCountLineList) { for (InvCountLine invCountLine:invCountLineList) {
if(StringUtil.isEmpty(invCountLine.getItemId())){
return new Result(false, StatusCode.ERROR,"行数据缺少商品id");
}
invCountLine.setId(UuidUtil.get32UUIDString()); invCountLine.setId(UuidUtil.get32UUIDString());
invCountLine.setInvCountHeaderId(uuidString); invCountLine.setInvCountHeaderId(uuidString);
invCountLine.setCreateBy(sysAccessToken.getUserName()); invCountLine.setCreateBy(sysAccessToken.getUserName());
...@@ -94,4 +126,77 @@ public class InvCountHeaderController { ...@@ -94,4 +126,77 @@ public class InvCountHeaderController {
// Result result = checkController.checkInvItem(token, jsonObject); // Result result = checkController.checkInvItem(token, jsonObject);
return new Result(true,StatusCode.OK,"盘点单保存成功",count_number); 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 { ...@@ -42,6 +42,13 @@ public class TakeStockController {
@Autowired @Autowired
private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper; private InvItemBalanceSummaryVMapper invItemBalanceSummaryVMapper;
/**
* 通过组织id查询库存信息
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/invInventory/search") @PostMapping("/invInventory/search")
public Result invInventorySearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception { public Result invInventorySearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
...@@ -61,6 +68,14 @@ public class TakeStockController { ...@@ -61,6 +68,14 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invInventories); return new Result(true,StatusCode.OK,"查询成功",invInventories);
} }
/**
* 通过库存id查询库区
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/invSubinventory/search") @PostMapping("/invSubinventory/search")
public Result invSubinventorySearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception { public Result invSubinventorySearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token); SysAccessToken sysAccessToken = userServer.checkToken(token);
...@@ -80,6 +95,14 @@ public class TakeStockController { ...@@ -80,6 +95,14 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invSubinventories); return new Result(true,StatusCode.OK,"查询成功",invSubinventories);
} }
/**
* 通过库区id查询货架
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/invLocator/search") @PostMapping("/invLocator/search")
public Result invLocatorSearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception { public Result invLocatorSearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token); SysAccessToken sysAccessToken = userServer.checkToken(token);
...@@ -98,6 +121,13 @@ public class TakeStockController { ...@@ -98,6 +121,13 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invLocators); return new Result(true,StatusCode.OK,"查询成功",invLocators);
} }
/**
* 通过扫描码和商品名称查询库存现有量
* @param token
* @param requestJson
* @return
* @throws Exception
*/
@PostMapping("/sku/search") @PostMapping("/sku/search")
public Result skuSearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception { public Result skuSearch(@RequestParam("access_token")String token, @RequestBody JSONObject requestJson) throws Exception {
SysAccessToken sysAccessToken = userServer.checkToken(token); SysAccessToken sysAccessToken = userServer.checkToken(token);
...@@ -135,6 +165,24 @@ public class TakeStockController { ...@@ -135,6 +165,24 @@ public class TakeStockController {
return new Result(false,StatusCode.ERROR,"请传入扫描码或是商品名称"); 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 @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
...@@ -331,7 +379,7 @@ public class TakeStockController { ...@@ -331,7 +379,7 @@ public class TakeStockController {
Date parse = sdf.parse(str); Date parse = sdf.parse(str);
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
cal.setTime(parse); cal.setTime(parse);
cal.add(Calendar.DATE, 1);//增加一个月 cal.add(Calendar.YEAR, 5);//增加5年
return sdf.format(cal.getTime()); return sdf.format(cal.getTime());
} }
...@@ -365,7 +413,6 @@ public class TakeStockController { ...@@ -365,7 +413,6 @@ public class TakeStockController {
} }
@PostMapping("/getPMPInvItem") @PostMapping("/getPMPInvItem")
@Transactional
public Result getPMPInvItem(@RequestParam("access_token")String access_token) { public Result getPMPInvItem(@RequestParam("access_token")String access_token) {
SysAccessToken sysAccessToken = userServer.checkToken(access_token); SysAccessToken sysAccessToken = userServer.checkToken(access_token);
String gettoken = HttpUtilRSA.getToken(); String gettoken = HttpUtilRSA.getToken();
......
...@@ -13,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -13,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
import orthopedics.controller.error.ErrorEnum; import orthopedics.controller.error.ErrorEnum;
import orthopedics.controller.operation.PurOrderHeaderStatusEnum; import orthopedics.controller.operation.PurOrderHeaderStatusEnum;
import orthopedics.controller.operation.PurOrderLineStatusEnum; import orthopedics.controller.operation.PurOrderLineStatusEnum;
import orthopedics.dao.InvCategoryMapper;
import orthopedics.dao.PurOrderHeaderMapper;
import orthopedics.model.*; import orthopedics.model.*;
import orthopedics.service.*; import orthopedics.service.*;
import orthopedics.util.*; import orthopedics.util.*;
...@@ -45,7 +47,11 @@ public class PurchaseController { ...@@ -45,7 +47,11 @@ public class PurchaseController {
//private final boolean receivableQuantityIncludeRejectsSwitch = false; //private final boolean receivableQuantityIncludeRejectsSwitch = false;
@Autowired
private InvCategoryMapper invCategoryMapper;
@Autowired
private PurOrderHeaderMapper purOrderHeaderMapper;
/** /**
* @param accessToken * @param accessToken
...@@ -164,8 +170,9 @@ public class PurchaseController { ...@@ -164,8 +170,9 @@ public class PurchaseController {
object.put("id", UuidUtil.get32UUIDString()); object.put("id", UuidUtil.get32UUIDString());
object.put("line_number", String.valueOf(i+1)); object.put("line_number", String.valueOf(i+1));
String itemCode = object.getString("item_code"); String itemCode = object.getString("item_code");
InvItem invItem=null;
if (StringUtil.notEmpty(itemCode)){ if (StringUtil.notEmpty(itemCode)){
InvItem invItem = checkItemCode(inventory.getId(), itemCode); invItem = checkItemCode(inventory.getId(), itemCode);
object.put("item_id",invItem.getId()); object.put("item_id",invItem.getId());
object.put("unit_code",invItem.getPrimaryUnit()); object.put("unit_code",invItem.getPrimaryUnit());
} else { } else {
...@@ -174,16 +181,14 @@ public class PurchaseController { ...@@ -174,16 +181,14 @@ public class PurchaseController {
} }
//InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategory(inventory.getId(), itemCode); //InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategory(inventory.getId(), itemCode);
InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategoryG(inventory.getId());
String categoryCode = ""; List<InvCategory> byCategoryCode = invCategoryMapper.findByCategoryCode(invItem.getProType());
if (invItemCategory != null){ String categoryCode=null;
InvCategory invCategory = inventoryServer.selectInvCategoryById(invItemCategory.getCategoryId()); if(byCategoryCode!=null && byCategoryCode.size()>0){
categoryCode = invCategory.getCategoryCode(); categoryCode = byCategoryCode.get(0).getCategoryCode();
} else { object.put("category_code", categoryCode);
logger.info("inv:" + invCode + "item_code:" + itemCode + "未找到物料分类");
throw ErrorEnum.CategoryError.createException(itemCode);
} }
object.put("category_code", categoryCode);
String destination = object.getString("destination"); String destination = object.getString("destination");
if (StringUtil.isEmpty(destination)){ if (StringUtil.isEmpty(destination)){
...@@ -322,7 +327,7 @@ public class PurchaseController { ...@@ -322,7 +327,7 @@ public class PurchaseController {
rcvReceiptHeader.setAttribute10(data.getString("attribute10")); rcvReceiptHeader.setAttribute10(data.getString("attribute10"));
rcvReceiptHeader.setInvId(inventory.getId()); rcvReceiptHeader.setInvId(inventory.getId());
rcvReceiptHeader.setReceiptType(receiptType); rcvReceiptHeader.setReceiptType(receiptType);
rcvReceiptHeader.setReceiptNumber(propertiesServer.generateFlowingWater("RCV_BATCH")); rcvReceiptHeader.setReceiptNumber(propertiesServer.generateFlowingWater("RCV_NUMBER"));
String receiptDate = data.getString("receipt_date"); String receiptDate = data.getString("receipt_date");
if (StringUtil.isEmpty(receiptDate)) { if (StringUtil.isEmpty(receiptDate)) {
rcvReceiptHeader.setReceiptDate(now); rcvReceiptHeader.setReceiptDate(now);
...@@ -398,6 +403,11 @@ public class PurchaseController { ...@@ -398,6 +403,11 @@ public class PurchaseController {
logger.info("---插入行-----"); logger.info("---插入行-----");
purchaseServer.batchInsertRcvReceiptLine(rcvReceiptLineList); purchaseServer.batchInsertRcvReceiptLine(rcvReceiptLineList);
if(headerSourceType.equals("PUR_ORDER_HEADER")){
purOrderHeaderMapper.updateStatusByPurOrderNumber(headerSourceHeaderNumber,"completed");
}
itemInspect(InspectionOrInventoryToolObjects, rcvReceiptHeader, sysUser, now, accessToken); itemInspect(InspectionOrInventoryToolObjects, rcvReceiptHeader, sysUser, now, accessToken);
List<JSONObject> implantsBeforeAccept = itemInspect(InspectionImplantLinesOrContainersObjects, rcvReceiptHeader, sysUser, now,accessToken); List<JSONObject> implantsBeforeAccept = itemInspect(InspectionImplantLinesOrContainersObjects, rcvReceiptHeader, sysUser, now,accessToken);
for (JSONObject object : implantsBeforeAccept) { for (JSONObject object : implantsBeforeAccept) {
...@@ -846,8 +856,9 @@ public class PurchaseController { ...@@ -846,8 +856,9 @@ public class PurchaseController {
for (int i = 0; i < lines.size(); i++) { for (int i = 0; i < lines.size(); i++) {
JSONObject object = lines.getJSONObject(i); JSONObject object = lines.getJSONObject(i);
String itemCode = object.getString("item_code"); String itemCode = object.getString("item_code");
InvItem invItem=null;
if (StringUtil.notEmpty(itemCode)){ if (StringUtil.notEmpty(itemCode)){
InvItem invItem = checkItemCode(rcvReceiptHeader.getInvId(), itemCode); invItem = checkItemCode(rcvReceiptHeader.getInvId(), itemCode);
object.put("item_id",invItem.getId()); object.put("item_id",invItem.getId());
object.put("unit_code",invItem.getPrimaryUnit()); object.put("unit_code",invItem.getPrimaryUnit());
} else { } else {
...@@ -855,16 +866,13 @@ public class PurchaseController { ...@@ -855,16 +866,13 @@ public class PurchaseController {
throw ErrorEnum.NotAllowToBeEmptyError.createException("item_code"); throw ErrorEnum.NotAllowToBeEmptyError.createException("item_code");
} }
InvItemCategory invItemCategory = inventoryServer.selectInvItemInventoryCategory(rcvReceiptHeader.getInvId(), itemCode); List<InvCategory> byCategoryCode = invCategoryMapper.findByCategoryCode(invItem.getProType());
String categoryCode = ""; String categoryCode=null;
if (invItemCategory != null){ if(byCategoryCode!=null && byCategoryCode.size()>0){
InvCategory invCategory = inventoryServer.selectInvCategoryById(invItemCategory.getCategoryId()); categoryCode = byCategoryCode.get(0).getCategoryCode();
categoryCode = invCategory.getCategoryCode(); object.put("category_code", categoryCode);
} else {
logger.info("item_code:" + itemCode + "未找到物料分类");
throw ErrorEnum.CategoryError.createException(itemCode);
} }
object.put("category_code", categoryCode);
String destination = object.getString("destination"); String destination = object.getString("destination");
if (StringUtil.isEmpty(destination)){ if (StringUtil.isEmpty(destination)){
...@@ -938,6 +946,7 @@ public class PurchaseController { ...@@ -938,6 +946,7 @@ public class PurchaseController {
} }
} }
implantOrContainerAccept(InventoryImplantLinesObjects, rcvReceiptHeader, sysUser, now, accessToken); implantOrContainerAccept(InventoryImplantLinesObjects, rcvReceiptHeader, sysUser, now, accessToken);
JSONObject reponseResult = new JSONObject(); JSONObject reponseResult = new JSONObject();
ErrorEnum.SUCCESS.putIntoMap(reponseResult); ErrorEnum.SUCCESS.putIntoMap(reponseResult);
JSONObject temp = new JSONObject(); JSONObject temp = new JSONObject();
...@@ -1167,7 +1176,10 @@ public class PurchaseController { ...@@ -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, private void InvItemIn(String accessToken, String rcvReceiptHeaderId,
...@@ -1921,7 +1933,7 @@ public class PurchaseController { ...@@ -1921,7 +1933,7 @@ public class PurchaseController {
private List<PurOrderHeaderV> getUniquePurOrderHeader(String userName, String userId, String status, String orgId) { private List<PurOrderHeaderV> getUniquePurOrderHeader(String userName, String userId, String status, String orgId) {
List<PurOrderHeaderV> purOrderHeaderVList = new ArrayList<>(); List<PurOrderHeaderV> purOrderHeaderVList = new ArrayList<>();
//由用户创建的头订单,status状态可选 //由用户创建的头订单,status状态可选
purOrderHeaderVList.addAll(purchaseServer.selectPurOrderHeaderVByUserNameAndStatusG(status)); purOrderHeaderVList.addAll(purchaseServer.selectPurOrderHeaderVByUserNameAndStatus(userName,status));
List<String> orgIdList = getValidOrgIdByUserId(userId); List<String> orgIdList = getValidOrgIdByUserId(userId);
//如果有orgId,则筛选出orgId的本级以及下级 //如果有orgId,则筛选出orgId的本级以及下级
if (StringUtil.notEmpty(orgId)) { if (StringUtil.notEmpty(orgId)) {
...@@ -1949,7 +1961,7 @@ public class PurchaseController { ...@@ -1949,7 +1961,7 @@ public class PurchaseController {
//status和headerId为筛选条件 //status和headerId为筛选条件
private List<PurOrderLineV> getUniquePurOrderLine(String userName, String userId, String status, String headerId) { private List<PurOrderLineV> getUniquePurOrderLine(String userName, String userId, String status, String headerId) {
List<PurOrderLineV> purOrderLineVList = new ArrayList<>(); List<PurOrderLineV> purOrderLineVList = new ArrayList<>();
purOrderLineVList.addAll(purchaseServer.selectPurOrderLineVByUserNameAndStatusAndHeaderIdG(status, headerId)); purOrderLineVList.addAll(purchaseServer.selectPurOrderLineVByUserNameAndStatusAndHeaderId(userName,status, headerId));
List<String> orgIdList = getValidOrgIdByUserId(userId); List<String> orgIdList = getValidOrgIdByUserId(userId);
if (orgIdList.size() > 0) { if (orgIdList.size() > 0) {
List<String> childOrgIdList = getAllValidChildOrgId(orgIdList); List<String> childOrgIdList = getAllValidChildOrgId(orgIdList);
......
...@@ -98,7 +98,7 @@ public class SaleController { ...@@ -98,7 +98,7 @@ public class SaleController {
orgId = checkOrgCode(orgCode); orgId = checkOrgCode(orgCode);
} }
if (StringUtil.notEmpty(saleHeaderStatus)) { 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); throw ErrorEnum.IllegalParamError.createException("sale_header_status", saleHeaderStatus);
} }
} }
...@@ -153,31 +153,31 @@ public class SaleController { ...@@ -153,31 +153,31 @@ public class SaleController {
List<SalOrderLineV> salOrderLineVList = getUniqueLine(sysAccessToken.getUserName(), sysAccessToken.getUserId(), List<SalOrderLineV> salOrderLineVList = getUniqueLine(sysAccessToken.getUserName(), sysAccessToken.getUserId(),
saleLineStatus, headId); saleLineStatus, headId);
JSONArray data = new JSONArray(); // JSONArray data = new JSONArray();
//
List<String> filterParam = Arrays.asList(new String[]{"create_by", "update_by", // List<String> filterParam = Arrays.asList(new String[]{"create_by", "update_by",
"create_time", "update_time", "org_id", "item_id"}); // "create_time", "update_time", "org_id", "item_id"});
PropertyFilter profilter = new PropertyFilter(){ // PropertyFilter profilter = new PropertyFilter(){
//
@Override // @Override
public boolean apply(Object object, String name, Object value) { // public boolean apply(Object object, String name, Object value) {
//
if(filterParam.contains(name)){ // if(filterParam.contains(name)){
return false; // return false;
} // }
return true; // return true;
} // }
//
}; // };
//
salOrderLineVList.forEach(v -> { // salOrderLineVList.forEach(v -> {
JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter)); // JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
data.add(o); // data.add(o);
}); // });
JSONObject responseResult = new JSONObject(); JSONObject responseResult = new JSONObject();
responseResult.put("data", data); responseResult.put("data", salOrderLineVList);
ErrorEnum.SUCCESS.putIntoMap(responseResult); ErrorEnum.SUCCESS.putIntoMap(responseResult);
logger.info("销售订单行信息查询接口返回结果:" + responseResult.toJSONString()); logger.info("销售订单行信息查询接口返回结果:" + responseResult.toJSONString());
return responseResult.toJSONString(); return responseResult.toJSONString();
......
...@@ -95,7 +95,8 @@ public class ShipController { ...@@ -95,7 +95,8 @@ public class ShipController {
}); });
//数据校验 //数据校验
String invId = checkInvCode(data.getString("inv_code")); String invId = checkInvCode(data.getString("inv_code"));
checkInvAccess(invId, sysAccessToken.getUserId()); //用户是否有权限访问仓库
//checkInvAccess(invId, sysAccessToken.getUserId());
String shipmentType = data.getString("shipment_type"); String shipmentType = data.getString("shipment_type");
if (!propertiesServer.isDataDictExist("SHIPMENT_TYPE", shipmentType)) { if (!propertiesServer.isDataDictExist("SHIPMENT_TYPE", shipmentType)) {
throw ErrorEnum.IllegalParamError.createException("shipment_type", shipmentType); throw ErrorEnum.IllegalParamError.createException("shipment_type", shipmentType);
...@@ -139,7 +140,7 @@ public class ShipController { ...@@ -139,7 +140,7 @@ public class ShipController {
header.setInvId(invId); header.setInvId(invId);
header.setShipmentType(shipmentType); header.setShipmentType(shipmentType);
String shipmentNumber = data.getString("shipment_number"); 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.setPartyId(StringUtil.notEmpty(partyCode) ? hpPartyV.getId() : null);
header.setPartySiteId(StringUtil.notEmpty(partySiteCode) ? hpPartySiteV.getId() : null); header.setPartySiteId(StringUtil.notEmpty(partySiteCode) ? hpPartySiteV.getId() : null);
String shipper = data.getString("shipper"); String shipper = data.getString("shipper");
...@@ -393,29 +394,29 @@ public class ShipController { ...@@ -393,29 +394,29 @@ public class ShipController {
List<WshShipmentHeaderV> wshShipmentHeaderVList = shipServer.selectShipHeaderVByInvIds(invIds, invCode, partyCode, partySiteCode, List<WshShipmentHeaderV> wshShipmentHeaderVList = shipServer.selectShipHeaderVByInvIds(invIds, invCode, partyCode, partySiteCode,
shipmentNumber, shipmentType, shipmentHeaderStatus); shipmentNumber, shipmentType, shipmentHeaderStatus);
JSONArray shipmentHeaderArray = new JSONArray(); // JSONArray shipmentHeaderArray = new JSONArray();
//
List<String> filterParam = Arrays.asList(new String[]{"id", "create_by", "update_by", // 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"}); // "create_time", "update_time", "org_id","inv_id", "item_id","party_id","party_site_id"});
PropertyFilter profilter = new PropertyFilter(){ // PropertyFilter profilter = new PropertyFilter(){
@Override // @Override
public boolean apply(Object object, String name, Object value) { // public boolean apply(Object object, String name, Object value) {
//
if(filterParam.contains(name)){ // if(filterParam.contains(name)){
return false; // return false;
} // }
return true; // return true;
} // }
}; // };
wshShipmentHeaderVList.forEach(v -> { // wshShipmentHeaderVList.forEach(v -> {
JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter)); // JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
shipmentHeaderArray.add(o); // shipmentHeaderArray.add(o);
}); // });
JSONObject responseResult = new JSONObject(); JSONObject responseResult = new JSONObject();
JSONObject responseData = new JSONObject(); JSONObject responseData = new JSONObject();
responseData.put("shipment_headers", shipmentHeaderArray); responseData.put("shipment_headers", wshShipmentHeaderVList);
responseResult.put("data", responseData); responseResult.put("data", responseData);
ErrorEnum.SUCCESS.putIntoMap(responseResult); ErrorEnum.SUCCESS.putIntoMap(responseResult);
logger.info("发运事务头查询接口返回结果:" + responseResult.toJSONString()); logger.info("发运事务头查询接口返回结果:" + responseResult.toJSONString());
...@@ -443,36 +444,36 @@ public class ShipController { ...@@ -443,36 +444,36 @@ public class ShipController {
} }
List<WshShipmentLineV> wshShipmentLineVList = shipServer.selectShipmentLineByInvId(invIds, shipmentNumber, shipmentLineStatus); List<WshShipmentLineV> wshShipmentLineVList = shipServer.selectShipmentLineByInvId(invIds, shipmentNumber, shipmentLineStatus);
List<String> filterParam = Arrays.asList(new String[]{"id", "create_by", "update_by", // 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"}); // "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(){ // PropertyFilter profilter = new PropertyFilter(){
@Override // @Override
public boolean apply(Object object, String name, Object value) { // public boolean apply(Object object, String name, Object value) {
//
if(filterParam.contains(name)){ // if(filterParam.contains(name)){
return false; // return false;
} // }
return true; // return true;
} // }
}; // };
wshShipmentLineVList.forEach(v -> { // wshShipmentLineVList.forEach(v -> {
JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter)); // JSONObject o = JSONObject.parseObject(JSON.toJSONString(v, profilter));
Map<String, Object> category = shipServer.selectCategory(v.getId()); // Map<String, Object> category = shipServer.selectCategory(v.getId());
if (category != null) { // if (category != null) {
o.put("category_code", category.get("category_code")); // o.put("category_code", category.get("category_code"));
o.put("category_name", category.get("category_name")); // o.put("category_name", category.get("category_name"));
o.put("category_desc", category.get("category_desc")); // o.put("category_desc", category.get("category_desc"));
}else { // }else {
logger.info(String.format("%s的物料%s没有配置类别",v.getInvCode(), v.getItemCode())); // logger.info(String.format("%s的物料%s没有配置类别",v.getInvCode(), v.getItemCode()));
} // }
lines.add(o); // lines.add(o);
}); // });
JSONObject responseResult = new JSONObject(); JSONObject responseResult = new JSONObject();
JSONObject responseData = new JSONObject(); JSONObject responseData = new JSONObject();
responseData.put("shipment_number", shipmentNumber); responseData.put("shipment_number", shipmentNumber);
responseData.put("wsh_shipment_lines", lines); responseData.put("wsh_shipment_lines", wshShipmentLineVList);
responseResult.put("data", responseData); responseResult.put("data", responseData);
ErrorEnum.SUCCESS.putIntoMap(responseResult); ErrorEnum.SUCCESS.putIntoMap(responseResult);
logger.info("发运事务行查询接口返回结果:" + responseResult.toJSONString()); logger.info("发运事务行查询接口返回结果:" + responseResult.toJSONString());
......
...@@ -158,7 +158,7 @@ public class UserController { ...@@ -158,7 +158,7 @@ public class UserController {
Map<String, Object> organizationInfo = organzitionServer.selectByUserId(user.getId()); Map<String, Object> organizationInfo = organzitionServer.selectByUserId(user.getId());
if (organizationInfo == null) { if (organizationInfo == null) {
logger.info("用户未分配组织"); logger.info("用户未分配组织");
//throw ErrorEnum.IllegalParamError.createException("userId", user.getId()); throw ErrorEnum.IllegalParamError.createException("userId", user.getId());
} }
//产生结果 //产生结果
JSONObject reponseResult = new JSONObject(); JSONObject reponseResult = new JSONObject();
......
...@@ -68,4 +68,19 @@ InvCountHeader selectInvCountHeaderById(@Param("id") String id); ...@@ -68,4 +68,19 @@ InvCountHeader selectInvCountHeaderById(@Param("id") String id);
//修改状态 //修改状态
@Update("update inv_count_header set header_status = #{status} where id = #{id}") @Update("update inv_count_header set header_status = #{status} where id = #{id}")
int updateInvCountHeaderStatus(@Param("status") String status, @Param("id") String 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; package orthopedics.dao;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.*;
import orthopedics.model.InvCountLine; import orthopedics.model.InvCountLine;
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;
/** /**
* @author ice * @author ice
*/ */
...@@ -73,4 +70,13 @@ Integer insert(InvCountLine InvCountLine); ...@@ -73,4 +70,13 @@ Integer insert(InvCountLine InvCountLine);
@Select("select * from inv_count_line where inv_count_header_id = #{id}") @Select("select * from inv_count_line where inv_count_header_id = #{id}")
@ResultMap("invcountline") @ResultMap("invcountline")
List<InvCountLine> selectByInvCountHeaderId(@Param("id") String id); 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); ...@@ -75,4 +75,12 @@ Integer insert(InvInventory InvInventory);
@Select("SELECT * FROM inv_inventory WHERE org_id = #{orgId} and status = 'A'") @Select("SELECT * FROM inv_inventory WHERE org_id = #{orgId} and status = 'A'")
@ResultMap("invinventory") @ResultMap("invinventory")
List<InvInventory> selectByOrgId(@Param("orgId") String orgId); 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{ ...@@ -27,6 +27,34 @@ public interface InvItemBalanceSummaryVMapper{
@Result(property = "subinv_name", column = "subinv_name"), @Result(property = "subinv_name", column = "subinv_name"),
@Result(property = "locator_code", column = "locator_code"), @Result(property = "locator_code", column = "locator_code"),
@Result(property = "locator_name", column = "locator_name"), @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 = "item_code", column = "item_code"),
@Result(property = "scancode", column = "scancode"), @Result(property = "scancode", column = "scancode"),
@Result(property = "purchase_price", column = "purchase_price"), @Result(property = "purchase_price", column = "purchase_price"),
...@@ -41,16 +69,16 @@ public interface InvItemBalanceSummaryVMapper{ ...@@ -41,16 +69,16 @@ public interface InvItemBalanceSummaryVMapper{
public List<InvItemBalanceSummaryV> select(); public List<InvItemBalanceSummaryV> select();
@Insert("<script>" + @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=','>" + "<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>" + "</foreach>" +
"</script>") "</script>")
Integer insertBatch(@Param("invitembalancesummaryvs")List<InvItemBalanceSummaryV> InvItemBalanceSummaryVList); Integer insertBatch(@Param("invitembalancesummaryvs")List<InvItemBalanceSummaryV> InvItemBalanceSummaryVList);
@Insert( @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" + "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},#{item_code},#{scancode},#{purchase_price},#{item_name},#{item_desc},#{max_inv_qty},#{min_inv_qty},#{specification},#{unit_code},#{unit_name})" "(#{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); Integer insert(InvItemBalanceSummaryV InvItemBalanceSummaryV);
...@@ -74,4 +102,30 @@ public interface InvItemBalanceSummaryVMapper{ ...@@ -74,4 +102,30 @@ public interface InvItemBalanceSummaryVMapper{
@Select("SELECT * FROM inv_item_balance_summary_v WHERE item_id = #{item_id}") @Select("SELECT * FROM inv_item_balance_summary_v WHERE item_id = #{item_id}")
@ResultMap("invitembalancesummaryv") @ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV> selectByItemId(@Param("item_id") String item_id); 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{ ...@@ -124,4 +124,19 @@ public interface InvItemMapper{
@Delete("DELETE FROM inv_item WHERE plucode = #{plucode}") @Delete("DELETE FROM inv_item WHERE plucode = #{plucode}")
int deleteByPlucode( @Param("plucode") String 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{ ...@@ -37,6 +37,20 @@ public interface InvLocatorMapper{
}) })
public List<InvLocator> selectById(@Param("id")String id); 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'") @Select("SELECT * FROM inv_locator WHERE inv_id=#{invId} AND subinv_id=#{subInvId} AND locator_code=#{locatorCode} AND status='A'")
@ResultMap("invlocator") @ResultMap("invlocator")
List<InvLocator> selectByLocatorCode(@Param("invId")String invId, @Param("subInvId")String subInvId, @Param("locatorCode")String locatorCode); List<InvLocator> selectByLocatorCode(@Param("invId")String invId, @Param("subInvId")String subInvId, @Param("locatorCode")String locatorCode);
...@@ -53,4 +67,12 @@ public interface InvLocatorMapper{ ...@@ -53,4 +67,12 @@ public interface InvLocatorMapper{
@ResultMap("invlocator") @ResultMap("invlocator")
List<InvLocator> selectLocatorByCode(@Param("locatorCode")String locatorCode); 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{ ...@@ -14,7 +14,7 @@ public interface InvSubinventoryMapper{
@Results(id = "invsubinventory", value ={ @Results(id = "invsubinventory", value ={
@Result(property = "id", column = "id"), @Result(property = "id", column = "id"),
@Result(property = "createBy", column = "create_by"), @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 = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"), @Result(property = "updateTime", column = "update_time"),
@Result(property = "attributeCategory", column = "attribute_category"), @Result(property = "attributeCategory", column = "attribute_category"),
...@@ -38,6 +38,20 @@ public interface InvSubinventoryMapper{ ...@@ -38,6 +38,20 @@ public interface InvSubinventoryMapper{
}) })
public List<InvSubinventory> selectById(@Param("id")String id); 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'") @Select("SELECT * FROM inv_subinventory WHERE inv_id = #{invId} AND subinv_code = #{subInvCode} AND status = 'A'")
@ResultMap("invsubinventory") @ResultMap("invsubinventory")
public List<InvSubinventory> selectSubInvIdByCode(@Param("invId")String invId, @Param("subInvCode")String subInvCode); public List<InvSubinventory> selectSubInvIdByCode(@Param("invId")String invId, @Param("subInvCode")String subInvCode);
...@@ -50,4 +64,17 @@ public interface InvSubinventoryMapper{ ...@@ -50,4 +64,17 @@ public interface InvSubinventoryMapper{
@ResultMap("invsubinventory") @ResultMap("invsubinventory")
public List<InvSubinventory> select(); 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{ ...@@ -19,9 +19,10 @@ public interface SalOrderLineVMapper{
@Results(id = "salorderlinev", value ={ @Results(id = "salorderlinev", value ={
@Result(property = "orgCode", column = "org_code"), @Result(property = "orgCode", column = "org_code"),
@Result(property = "orgName", column = "org_name"), @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 = "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 = "lineStatusName", column = "line_status_name"),
@Result(property = "sourceTypeName", column = "source_type_name"), @Result(property = "sourceTypeName", column = "source_type_name"),
@Result(property = "id", column = "id"), @Result(property = "id", column = "id"),
...@@ -41,6 +42,7 @@ public interface SalOrderLineVMapper{ ...@@ -41,6 +42,7 @@ public interface SalOrderLineVMapper{
@Result(property = "orgId", column = "org_id"), @Result(property = "orgId", column = "org_id"),
@Result(property = "salOrderHeaderId", column = "sal_order_header_id"), @Result(property = "salOrderHeaderId", column = "sal_order_header_id"),
@Result(property = "lineNumber", column = "line_number"), @Result(property = "lineNumber", column = "line_number"),
@Result(property = "itemName", column = "item_name"),
@Result(property = "itemId", column = "item_id"), @Result(property = "itemId", column = "item_id"),
@Result(property = "quantity", column = "quantity"), @Result(property = "quantity", column = "quantity"),
@Result(property = "unitCode", column = "unit_code"), @Result(property = "unitCode", column = "unit_code"),
...@@ -59,7 +61,11 @@ public interface SalOrderLineVMapper{ ...@@ -59,7 +61,11 @@ public interface SalOrderLineVMapper{
@Result(property = "createTime", column = "create_time"), @Result(property = "createTime", column = "create_time"),
@Result(property = "pricingDate", column = "pricing_date"), @Result(property = "pricingDate", column = "pricing_date"),
@Result(property = "updateTime", column = "update_time"), @Result(property = "updateTime", column = "update_time"),
@Result(property = "orderHeaderId", column = "order_header_id"),
@Result(property = "sourceHeaderNumber", column = "source_header_number"), @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(); public List<SalOrderLineV> select();
...@@ -69,7 +75,7 @@ public interface SalOrderLineVMapper{ ...@@ -69,7 +75,7 @@ public interface SalOrderLineVMapper{
+ " AND line_status = #{salLineStatus}" + " AND line_status = #{salLineStatus}"
+ "</if>" + "</if>"
+ "<if test = 'salHeaderId != null and salHeaderId != \"\"'>" + "<if test = 'salHeaderId != null and salHeaderId != \"\"'>"
+ " AND sal_order_header_id = #{salHeaderId}" + " AND order_header_id = #{salHeaderId}"
+ "</if>" + "</if>"
+ "</script>") + "</script>")
@ResultMap("salorderlinev") @ResultMap("salorderlinev")
...@@ -99,16 +105,20 @@ public interface SalOrderLineVMapper{ ...@@ -99,16 +105,20 @@ public interface SalOrderLineVMapper{
@Insert("<script>" + @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" + "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=','>" + "<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})" + "(#{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>" + "</foreach>" +
"</script>") "</script>")
Integer insertBatch(@Param("salorderlinevs")List<SalOrderLineV> SalOrderLineVList); Integer insertBatch(@Param("salorderlinevs")List<SalOrderLineV> SalOrderLineVList);
@Insert( @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" + "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},#{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})" "(#{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); 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 + '\'' +
'}';
}
}
...@@ -4,152 +4,176 @@ import java.util.ArrayList; ...@@ -4,152 +4,176 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/** /**
* *
* @author * @author author
*/ */
public class InvSubinventory implements Serializable { 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; private String id;
/** /**
* 创建人 * 创建人
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "create_by")
private String createBy; private String createBy;
/** /**
* 创建日期 * 创建日期
* isNullAble:1 * isNullAble:1
*/ */
private java.time.LocalDateTime createTime; @JSONField(name = "create_date")
private java.time.LocalDateTime createDate;
/** /**
* 最后更新人 * 最后更新人
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "update_by")
private String updateBy; private String updateBy;
/** /**
* 最后更新日期 * 最后更新日期
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime; private java.time.LocalDateTime updateTime;
/** /**
* 备用字段分类 * 备用字段分类
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute_category")
private String attributeCategory; private String attributeCategory;
/** /**
* 备用字段1 * 备用字段1
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute1")
private String attribute1; private String attribute1;
/** /**
* 备用字段2 * 备用字段2
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute2")
private String attribute2; private String attribute2;
/** /**
* 备用子段3 * 备用子段3
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute3")
private String attribute3; private String attribute3;
/** /**
* 备用字段4 * 备用字段4
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute4")
private String attribute4; private String attribute4;
/** /**
* 备用字段5 * 备用字段5
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute5")
private String attribute5; private String attribute5;
/** /**
* 备用字段6 * 备用字段6
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute6")
private String attribute6; private String attribute6;
/** /**
* 备用字段7 * 备用字段7
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute7")
private String attribute7; private String attribute7;
/** /**
* 备用字段8 * 备用字段8
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute8")
private String attribute8; private String attribute8;
/** /**
* 备用字段9 * 备用字段9
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute9")
private String attribute9; private String attribute9;
/** /**
* 备用字段10 * 备用字段10
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "attribute10")
private String attribute10; private String attribute10;
/** /**
* 库存 * 库存
* isNullAble:0 * isNullAble:0
*/ */
@JSONField(name = "inv_id")
private String invId; private String invId;
/** /**
* 子库存类型 * 库区类型
* isNullAble:0 * isNullAble:0
*/ */
@JSONField(name = "subinv_type")
private String subinvType; private String subinvType;
/** /**
* 子库存代码 * 库区代码
* isNullAble:0 * isNullAble:0
*/ */
@JSONField(name = "subinv_code")
private String subinvCode; private String subinvCode;
/** /**
* 子库存名称 * 库区名称
* isNullAble:0 * isNullAble:0
*/ */
@JSONField(name = "subinv_name")
private String subinvName; private String subinvName;
/** /**
* 子库存说明 * 库区说明
* isNullAble:1 * isNullAble:1
*/ */
@JSONField(name = "subinv_desc")
private String subinvDesc; private String subinvDesc;
/** /**
* 货位控制 * 启用货架
* isNullAble:0 * isNullAble:0
*/ */
@JSONField(name = "locator_control")
private String locatorControl; private String locatorControl;
/** /**
* 状态 * 状态
* isNullAble:0,defaultVal:A * isNullAble:0,defaultVal:A
*/ */
@JSONField(name = "status")
private String status; private String status;
...@@ -161,9 +185,9 @@ public class InvSubinventory implements Serializable { ...@@ -161,9 +185,9 @@ public class InvSubinventory implements Serializable {
public String getCreateBy(){return this.createBy;} 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;} public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
...@@ -249,7 +273,7 @@ public class InvSubinventory implements Serializable { ...@@ -249,7 +273,7 @@ public class InvSubinventory implements Serializable {
return "InvSubinventory{" + return "InvSubinventory{" +
"id='" + id + '\'' + "id='" + id + '\'' +
"createBy='" + createBy + '\'' + "createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' + "createDate='" + createDate + '\'' +
"updateBy='" + updateBy + '\'' + "updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' + "updateTime='" + updateTime + '\'' +
"attributeCategory='" + attributeCategory + '\'' + "attributeCategory='" + attributeCategory + '\'' +
...@@ -270,7 +294,7 @@ public class InvSubinventory implements Serializable { ...@@ -270,7 +294,7 @@ public class InvSubinventory implements Serializable {
"subinvDesc='" + subinvDesc + '\'' + "subinvDesc='" + subinvDesc + '\'' +
"locatorControl='" + locatorControl + '\'' + "locatorControl='" + locatorControl + '\'' +
"status='" + status + '\'' + "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 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 { ...@@ -69,7 +69,7 @@ public class InvItemRfidService {
invItemRfid.setCreate_by(sysAccessToken.getUserName()); invItemRfid.setCreate_by(sysAccessToken.getUserName());
invItemRfid.setCreate_time(LocalDateTime.now()); invItemRfid.setCreate_time(LocalDateTime.now());
// invItemRfid.setRfid(String.format("%016d", num)); // invItemRfid.setRfid(String.format("%016d", num));
invItemRfid.setRfid(UuidUtil.GetRandomString(16)); invItemRfid.setRfid(getRfid());
invItemRfid.setStaust("CREATED"); invItemRfid.setStaust("CREATED");
invItemRfidMapper.insert(invItemRfid); invItemRfidMapper.insert(invItemRfid);
num=num+1; num=num+1;
...@@ -79,7 +79,7 @@ public class InvItemRfidService { ...@@ -79,7 +79,7 @@ public class InvItemRfidService {
invItemRfid.setId(UuidUtil.get32UUIDString()); invItemRfid.setId(UuidUtil.get32UUIDString());
invItemRfid.setCreate_by(sysAccessToken.getUserName()); invItemRfid.setCreate_by(sysAccessToken.getUserName());
invItemRfid.setCreate_time(LocalDateTime.now()); invItemRfid.setCreate_time(LocalDateTime.now());
invItemRfid.setRfid(UuidUtil.GetRandomString(16)); invItemRfid.setRfid(getRfid());
invItemRfid.setStaust("CREATED"); invItemRfid.setStaust("CREATED");
invItemRfidMapper.insert(invItemRfid); invItemRfidMapper.insert(invItemRfid);
num=num+1; num=num+1;
...@@ -103,7 +103,7 @@ public class InvItemRfidService { ...@@ -103,7 +103,7 @@ public class InvItemRfidService {
public String getrfid() { public String getrfid() {
while (true){ while (true){
String date = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); String date = new SimpleDateFormat("yyMMddHHmmss").format(new Date());
String rfid = date+getsjs(); String rfid = date+getsjs();
List<InvItemRfid> invItemRfids = invItemRfidMapper.selectByRfid(rfid); List<InvItemRfid> invItemRfids = invItemRfidMapper.selectByRfid(rfid);
if(invItemRfids==null||invItemRfids.size()<=0){ if(invItemRfids==null||invItemRfids.size()<=0){
...@@ -113,6 +113,11 @@ public class InvItemRfidService { ...@@ -113,6 +113,11 @@ public class InvItemRfidService {
} }
public String getRfid() {
String date = new SimpleDateFormat("yyMMdd").format(new Date());
return date+UuidUtil.GetRandomString(10);
}
@Autowired @Autowired
private Environment env; private Environment env;
......
...@@ -117,4 +117,13 @@ public class StringUtil { ...@@ -117,4 +117,13 @@ public class StringUtil {
} }
return tempBuilder.reverse().toString(); 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; ...@@ -8,14 +8,11 @@ import java.util.Map;
public class Demo { public class Demo {
public static void main(String[] args) { public static void main(String[] args) {
String s = MD5Util.MD5Encode("test","utf-8"); System.err.println("789");
System.err.println(s); if(1 % 10000 == 0){
Map map=new HashMap(); System.err.println("123");
map.put("UserID",""); }
map.put("Password","");
map.put("TempEncryptKey","");
map.put("Timestamp","");
map.put("MD5","");
// HttpUtil.post()
} }
} }
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);
// }
}
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