更新-商品属性的选择加载
This commit is contained in:
@@ -262,7 +262,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
||||
pageUtil.setAdvSearch(getCondition());
|
||||
depotItemService.find(pageUtil);
|
||||
List<DepotItem> dataList = pageUtil.getPageList();
|
||||
|
||||
String mpList = model.getMpList(); //商品属性
|
||||
String[] mpArr = mpList.split(",");
|
||||
JSONObject outer = new JSONObject();
|
||||
outer.put("total", pageUtil.getTotalCount());
|
||||
//存放数据json数组
|
||||
@@ -280,11 +281,29 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
|
||||
ratio = depotItem.getMaterialId().getUnitId().getUName();
|
||||
ratio = ratio.substring(ratio.indexOf("("));
|
||||
}
|
||||
//品名/型号/规格/颜色/包装
|
||||
String MaterialName = depotItem.getMaterialId().getName() + ((depotItem.getMaterialId().getModel() == null||depotItem.getMaterialId().getModel().equals(""))?"":"("+depotItem.getMaterialId().getModel()+ ")")
|
||||
+((depotItem.getMaterialId().getStandard() == null||depotItem.getMaterialId().getStandard().equals(""))?"":"("+depotItem.getMaterialId().getStandard() + ")")
|
||||
+((depotItem.getMaterialId().getColor() == null||depotItem.getMaterialId().getColor().equals(""))?"":"("+depotItem.getMaterialId().getColor() + ")")
|
||||
+ ratio;
|
||||
//品名/型号/扩展信息/包装
|
||||
String MaterialName = depotItem.getMaterialId().getName() + ((depotItem.getMaterialId().getModel() == null || depotItem.getMaterialId().getModel().equals(""))?"":"("+depotItem.getMaterialId().getModel() + ")");
|
||||
for(int i=0; i< mpArr.length; i++) {
|
||||
if(mpArr[i].equals("颜色")) {
|
||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getColor() == null || depotItem.getMaterialId().getColor().equals(""))?"":"("+depotItem.getMaterialId().getColor() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("规格")) {
|
||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getStandard() == null || depotItem.getMaterialId().getStandard().equals(""))?"":"("+depotItem.getMaterialId().getStandard() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("制造商")) {
|
||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getMfrs() == null || depotItem.getMaterialId().getMfrs().equals(""))?"":"("+depotItem.getMaterialId().getMfrs() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("自定义1")) {
|
||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getOtherField1() == null || depotItem.getMaterialId().getOtherField1().equals(""))?"":"("+depotItem.getMaterialId().getOtherField1() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("自定义2")) {
|
||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getOtherField2() == null || depotItem.getMaterialId().getOtherField2().equals(""))?"":"("+depotItem.getMaterialId().getOtherField2() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("自定义3")) {
|
||||
MaterialName = MaterialName + ((depotItem.getMaterialId().getOtherField3() == null || depotItem.getMaterialId().getOtherField3().equals(""))?"":"("+depotItem.getMaterialId().getOtherField3() + ")");
|
||||
}
|
||||
}
|
||||
MaterialName = MaterialName + ratio;
|
||||
item.put("MaterialName", MaterialName);
|
||||
item.put("Unit", depotItem.getMUnit());
|
||||
item.put("OperNumber", depotItem.getOperNumber());
|
||||
|
||||
@@ -412,8 +412,8 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>回写查询商品信息结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* 查找商品信息-下拉框
|
||||
* @return
|
||||
*/
|
||||
@@ -425,6 +425,8 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
pageUtil.setAdvSearch(getCondition_Select());
|
||||
materialService.find(pageUtil);
|
||||
List<Material> dataList = pageUtil.getPageList();
|
||||
String mpList = model.getMpList(); //商品属性
|
||||
String[] mpArr = mpList.split(",");
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if(null != dataList) {
|
||||
@@ -439,11 +441,29 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
ratio = material.getUnitId().getUName();
|
||||
ratio = ratio.substring(ratio.indexOf("("));
|
||||
}
|
||||
//品名/型号/规格/颜色/包装
|
||||
String MaterialName = material.getName() + ((material.getModel() == null || material.getModel().equals(""))?"":"("+material.getModel() + ")")
|
||||
+ ((material.getStandard() == null || material.getStandard().equals(""))?"":"("+material.getStandard() + ")")
|
||||
+ ((material.getColor() == null || material.getColor().equals(""))?"":"("+material.getColor() + ")")
|
||||
+ ratio;
|
||||
//品名/型号/扩展信息/包装
|
||||
String MaterialName = material.getName() + ((material.getModel() == null || material.getModel().equals(""))?"":"("+material.getModel() + ")");
|
||||
for(int i=0; i< mpArr.length; i++) {
|
||||
if(mpArr[i].equals("颜色")) {
|
||||
MaterialName = MaterialName + ((material.getColor() == null || material.getColor().equals(""))?"":"("+material.getColor() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("规格")) {
|
||||
MaterialName = MaterialName + ((material.getStandard() == null || material.getStandard().equals(""))?"":"("+material.getStandard() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("制造商")) {
|
||||
MaterialName = MaterialName + ((material.getMfrs() == null || material.getMfrs().equals(""))?"":"("+material.getMfrs() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("自定义1")) {
|
||||
MaterialName = MaterialName + ((material.getOtherField1() == null || material.getOtherField1().equals(""))?"":"("+material.getOtherField1() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("自定义2")) {
|
||||
MaterialName = MaterialName + ((material.getOtherField2() == null || material.getOtherField2().equals(""))?"":"("+material.getOtherField2() + ")");
|
||||
}
|
||||
if(mpArr[i].equals("自定义3")) {
|
||||
MaterialName = MaterialName + ((material.getOtherField3() == null || material.getOtherField3().equals(""))?"":"("+material.getOtherField3() + ")");
|
||||
}
|
||||
}
|
||||
MaterialName = MaterialName + ratio;
|
||||
item.put("MaterialName", MaterialName);
|
||||
dataArray.add(item);
|
||||
}
|
||||
@@ -456,8 +476,10 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
}
|
||||
catch (IOException e) {
|
||||
Log.errorFileSync(">>>>>>>>>回写查询供应商信息结果异常", e);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找商品信息-统计排序
|
||||
|
||||
@@ -76,6 +76,8 @@ public class DepotItemModel implements Serializable
|
||||
*/
|
||||
private InputStream excelStream;
|
||||
|
||||
private String mpList = ""; //商品属性
|
||||
|
||||
public DepotItemShowModel getShowModel() {
|
||||
return showModel;
|
||||
}
|
||||
@@ -371,4 +373,12 @@ public class DepotItemModel implements Serializable
|
||||
public void setMType(String MType) {
|
||||
this.MType = MType;
|
||||
}
|
||||
|
||||
public String getMpList() {
|
||||
return mpList;
|
||||
}
|
||||
|
||||
public void setMpList(String mpList) {
|
||||
this.mpList = mpList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,8 @@ public class MaterialModel implements Serializable
|
||||
private String fileName = ""; //文件名称
|
||||
private InputStream excelStream; //输入流,导出excel文件
|
||||
|
||||
private String mpList = ""; //商品属性
|
||||
|
||||
public MaterialShowModel getShowModel() {
|
||||
return showModel;
|
||||
}
|
||||
@@ -393,4 +395,12 @@ public class MaterialModel implements Serializable
|
||||
public void setMaterialFile(File materialFile) {
|
||||
this.materialFile = materialFile;
|
||||
}
|
||||
|
||||
public String getMpList() {
|
||||
return mpList;
|
||||
}
|
||||
|
||||
public void setMpList(String mpList) {
|
||||
this.mpList = mpList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,7 @@ import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.math.BigInteger;
|
||||
/**
|
||||
@@ -576,7 +573,7 @@ public class Tools
|
||||
{
|
||||
return new SimpleDateFormat(pattern).parse(strDate);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 过滤html文件中的图片文件
|
||||
// * @param content
|
||||
|
||||
Reference in New Issue
Block a user