出库导入更改

master
e 2019-06-27 07:49:30 +08:00
parent 9a74513fc7
commit 0d070d6aae
2 changed files with 505 additions and 12 deletions

View File

@ -19,6 +19,7 @@ import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import com.zzjee.tms.entity.TmsYwDingdanEntity;
import com.zzjee.wm.page.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
@ -86,11 +87,6 @@ import com.zzjee.wm.entity.WmOmNoticeHEntity;
import com.zzjee.wm.entity.WmOmNoticeIEntity;
import com.zzjee.wm.entity.WmOmQmIEntity;
import com.zzjee.wm.entity.WmPlatIoEntity;
import com.zzjee.wm.page.WmNoticeImpPage;
import com.zzjee.wm.page.WmOmNoticeHPage;
import com.zzjee.wm.page.WmOmNoticeImpPage;
import com.zzjee.wm.page.confrowpage;
import com.zzjee.wm.page.wmomnoticeipage;
import com.zzjee.wm.service.WmOmNoticeHServiceI;
import com.zzjee.wmutil.resResult;
import com.zzjee.wmutil.sdresult;
@ -2103,11 +2099,11 @@ public class WmOmNoticeHController extends BaseController {
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<WmNoticeImpPage> list = ExcelImportUtil.importExcel(file.getInputStream(), WmNoticeImpPage.class, params);
List<WmOmNoticeImpnewPage> list = ExcelImportUtil.importExcel(file.getInputStream(), WmOmNoticeImpnewPage.class, params);
String flag = "Y";
String message="";
for(WmNoticeImpPage wmt:list){
for(WmOmNoticeImpnewPage wmt:list){
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode", wmt.getGoodsId());
if(mvgoods==null){
@ -2119,7 +2115,7 @@ public class WmOmNoticeHController extends BaseController {
j.setMsg(message+"不存在");
return j;
}
List<WmNoticeImpPage> listheader = ExcelImportUtil.importExcel(
List<WmOmNoticeImpnewPage> listheader = ExcelImportUtil.importExcel(
file.getInputStream(), WmNoticeImpPage.class, params);
for(int i=0;i<listheader.size()-1;i++){
for(int k=listheader.size()-1;k>i;k--){
@ -2128,14 +2124,14 @@ public class WmOmNoticeHController extends BaseController {
}
}
}
for(WmNoticeImpPage pageheader: listheader) {
for(WmOmNoticeImpnewPage pageheader: listheader) {
List<WmOmNoticeHEntity> wmomh = systemService.findByProperty(WmOmNoticeHEntity.class, "imCusCode", pageheader.getImCusCode());
if(wmomh!=null&&wmomh.size()>0){
continue;
}
List<WmOmNoticeIEntity> wmomNoticeIListnew = new ArrayList<WmOmNoticeIEntity>();
for (WmNoticeImpPage page : list) {
for (WmOmNoticeImpnewPage page : list) {
if(pageheader.getImCusCode().equals(page.getImCusCode())) {
WmOmNoticeIEntity wmi = new WmOmNoticeIEntity();
wmi.setGoodsId(page.getGoodsId());
@ -2164,7 +2160,10 @@ public class WmOmNoticeHController extends BaseController {
}
}
WmOmNoticeHEntity wmOmNoticeH = new WmOmNoticeHEntity();
wmOmNoticeH.setReMember(pageheader.getReMember());
wmOmNoticeH.setReCarno(pageheader.getReCarno());
wmOmNoticeH.setDelvMember(pageheader.getDelvMember());
wmOmNoticeH.setDelvMobile(pageheader.getDelvMobile());
wmOmNoticeH.setDelvData(pageheader.getImData());
wmOmNoticeH.setOrderTypeCode(pageheader.getOrderTypeCode());
wmOmNoticeH.setCusCode(pageheader.getCusCode());
@ -2336,7 +2335,7 @@ public class WmOmNoticeHController extends BaseController {
@RequestMapping(params = "exportXlsByT")
public String exportXlsByT(ModelMap map) {
map.put(NormalExcelConstants.FILE_NAME,"出货通知");
map.put(NormalExcelConstants.CLASS,WmNoticeImpPage.class);
map.put(NormalExcelConstants.CLASS,WmOmNoticeImpnewPage.class);
map.put(NormalExcelConstants.PARAMS,new ExportParams("出货通知", "导出人:"+ ResourceUtil.getSessionUserName().getRealName(),
"导出信息"));
map.put(NormalExcelConstants.DATA_LIST,new ArrayList());

View File

@ -0,0 +1,494 @@
package com.zzjee.wm.page;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.Date;
/**
* @Title: Entity
* @Description:
* @author erzhongxmu
* @date 2017-09-11 15:08:34
* @version V1.0
*
*/
public class WmOmNoticeImpnewPage implements java.io.Serializable {
/**主键*/
private String id;
/**创建人名称*/
private String createName;
/**创建人登录名称*/
private String createBy;
/**创建日期*/
private Date createDate;
/**更新人名称*/
private String updateName;
/**更新人登录名称*/
private String updateBy;
/**更新日期*/
private Date updateDate;
/**所属部门*/
private String readonly;
private String wherecon;
private String sysOrgCode;
/**所属公司*/
private String sysCompanyCode;
/**客户编码*/
@Excel(name="客户编码")
private String cusCode;
/**预计到货时间*/
@Excel(name="预计出货时间",format = "yyyy-MM-dd")
private Date imData;
/**客户订单号*/
@Excel(name="客户订单号")
private String imCusCode;
@Excel(name="订单类型")
private String orderTypeCode;
@Excel(name="备注")
private String imBeizhu;
@Excel(name="收货人")
private java.lang.String delvMember;
/**收货人电话*/
@Excel(name="收货人电话")
private java.lang.String delvMobile;
@Excel(name="收货地址")
private String delvAddr;
/**承运人*/
@Excel(name="运输公司")
private java.lang.String reMember;
/**承运人车号*/
@Excel(name="发货运单号")
private java.lang.String reCarno;
/**进货通知单号*/
// @Excel(name="通知单号")
private String noticeId;
// @Excel(name="合作伙伴编号")
private String supCode;
/**附件*/
// @Excel(name="合作伙伴名称")
private String supName;
// @Excel(name="其他系统ID")
private String otherId;
@Excel(name="商品")
private String goodsId;
@Excel(name="商品名称")
private String goodsName;
/**出货数量*/
@Excel(name="数量")
private String goodsQua;
/**出货单位*/
@Excel(name="单位")
private String goodsUnit;
// @Excel(name="储位")
private String binOm;
// @Excel(name="托盘")
private String binId;
// @Excel(name="生产日期")
private String goodsProData;
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getId(){
return this.id;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setId(String id){
this.id = id;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getCreateName(){
return this.createName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateName(String createName){
this.createName = createName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getCreateBy(){
return this.createBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateBy(String createBy){
this.createBy = createBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
public Date getCreateDate(){
return this.createDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setCreateDate(Date createDate){
this.createDate = createDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getUpdateName(){
return this.updateName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateName(String updateName){
this.updateName = updateName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getUpdateBy(){
return this.updateBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateBy(String updateBy){
this.updateBy = updateBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
public Date getUpdateDate(){
return this.updateDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setUpdateDate(Date updateDate){
this.updateDate = updateDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getSysOrgCode(){
return this.sysOrgCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysOrgCode(String sysOrgCode){
this.sysOrgCode = sysOrgCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getSysCompanyCode(){
return this.sysCompanyCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysCompanyCode(String sysCompanyCode){
this.sysCompanyCode = sysCompanyCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getCusCode(){
return this.cusCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCusCode(String cusCode){
this.cusCode = cusCode;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
public Date getImData(){
return this.imData;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setImData(Date imData){
this.imData = imData;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getImCusCode(){
return this.imCusCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setImCusCode(String imCusCode){
this.imCusCode = imCusCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getOrderTypeCode(){
return this.orderTypeCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setOrderTypeCode(String orderTypeCode){
this.orderTypeCode = orderTypeCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
/**
*: java.lang.String
*@return: java.lang.String
*/
public String getImBeizhu(){
return this.imBeizhu;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setImBeizhu(String imBeizhu){
this.imBeizhu = imBeizhu;
}
public String getNoticeId(){
return this.noticeId;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setNoticeId(String noticeId){
this.noticeId = noticeId;
}
public String getReadonly() {
return readonly;
}
public void setReadonly(String readonly) {
this.readonly = readonly;
}
public String getWherecon() {
return wherecon;
}
public void setWherecon(String wherecon) {
this.wherecon = wherecon;
}
public String getSupCode() {
return supCode;
}
public void setSupCode(String supCode) {
this.supCode = supCode;
}
public String getSupName() {
return supName;
}
public void setSupName(String supName) {
this.supName = supName;
}
public String getOtherId() {
return otherId;
}
public void setOtherId(String otherId) {
this.otherId = otherId;
}
public String getGoodsId() {
return goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getGoodsQua() {
return goodsQua;
}
public void setGoodsQua(String goodsQua) {
this.goodsQua = goodsQua;
}
public String getGoodsUnit() {
return goodsUnit;
}
public void setGoodsUnit(String goodsUnit) {
this.goodsUnit = goodsUnit;
}
public String getDelvAddr() {
return delvAddr;
}
public void setDelvAddr(String delvAddr) {
this.delvAddr = delvAddr;
}
public String getBinOm() {
return binOm;
}
public void setBinOm(String binOm) {
this.binOm = binOm;
}
public String getBinId() {
return binId;
}
public void setBinId(String binId) {
this.binId = binId;
}
public String getGoodsProData() {
return goodsProData;
}
public void setGoodsProData(String goodsProData) {
this.goodsProData = goodsProData;
}
public String getDelvMember() {
return delvMember;
}
public void setDelvMember(String delvMember) {
this.delvMember = delvMember;
}
public String getDelvMobile() {
return delvMobile;
}
public void setDelvMobile(String delvMobile) {
this.delvMobile = delvMobile;
}
public String getReMember() {
return reMember;
}
public void setReMember(String reMember) {
this.reMember = reMember;
}
public String getReCarno() {
return reCarno;
}
public void setReCarno(String reCarno) {
this.reCarno = reCarno;
}
}