把 制造商 改为 颜色
This commit is contained in:
@@ -280,9 +280,10 @@ 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().getMfrs() == null||depotItem.getMaterialId().getMfrs().equals(""))?"":"("+depotItem.getMaterialId().getMfrs() + ")")
|
||||
+((depotItem.getMaterialId().getStandard() == null||depotItem.getMaterialId().getStandard().equals(""))?"":"("+depotItem.getMaterialId().getStandard() + ")")
|
||||
+((depotItem.getMaterialId().getColor() == null||depotItem.getMaterialId().getColor().equals(""))?"":"("+depotItem.getMaterialId().getColor() + ")")
|
||||
+ ratio;
|
||||
item.put("MaterialName", MaterialName);
|
||||
item.put("Unit", depotItem.getMUnit());
|
||||
|
||||
@@ -374,7 +374,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
item.put("SafetyStock", material.getSafetyStock()==null?"" : material.getSafetyStock());
|
||||
item.put("Model", material.getModel());
|
||||
item.put("Standard", material.getStandard());
|
||||
item.put("Color", material.getColor());
|
||||
item.put("Color", material.getColor()==null?"": material.getColor());
|
||||
item.put("Unit", material.getUnit());
|
||||
item.put("RetailPrice", material.getRetailPrice());
|
||||
item.put("LowPrice", material.getLowPrice());
|
||||
@@ -430,9 +430,10 @@ 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.getMfrs() == null || material.getMfrs().equals(""))?"":"("+material.getMfrs() + ")")
|
||||
+ ((material.getStandard() == null || material.getStandard().equals(""))?"":"("+material.getStandard() + ")")
|
||||
+ ((material.getColor() == null || material.getColor().equals(""))?"":"("+material.getColor() + ")")
|
||||
+ ratio;
|
||||
item.put("MaterialName", MaterialName);
|
||||
dataArray.add(item);
|
||||
@@ -563,7 +564,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
Map<String,Object> condition = new HashMap<String,Object>();
|
||||
condition.put("Name_s_like", model.getName());
|
||||
condition.put("Model_s_like", model.getModel());
|
||||
condition.put("Mfrs_s_like", model.getMfrs());
|
||||
condition.put("Color_s_like", model.getColor());
|
||||
condition.put("Id_s_order", "asc");
|
||||
return condition;
|
||||
}
|
||||
@@ -579,7 +580,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
Map<String,Object> condition = new HashMap<String,Object>();
|
||||
condition.put("Name_s_like", model.getName());
|
||||
condition.put("Model_s_like", model.getModel());
|
||||
condition.put("Mfrs_s_like", model.getMfrs());
|
||||
condition.put("Color_s_like", model.getColor());
|
||||
condition.put("CategoryId_s_in", model.getCategoryIds());
|
||||
condition.put("Id_s_order", "asc");
|
||||
return condition;
|
||||
@@ -592,7 +593,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
|
||||
}
|
||||
condition.put("Name_s_eq", model.getName());
|
||||
condition.put("Model_s_eq", model.getModel());
|
||||
condition.put("Mfrs_s_eq", model.getMfrs());
|
||||
condition.put("Color_s_eq", model.getColor());
|
||||
if(model.getUnit()!=null){
|
||||
condition.put("Unit_s_eq", model.getUnit());
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
||||
@SuppressWarnings("unchecked")
|
||||
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException {
|
||||
StringBuffer queryString = new StringBuffer();
|
||||
queryString.append("select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model,' ',jsh_material.Mfrs)) as mName from jsh_depotitem inner join jsh_material " +
|
||||
queryString.append("select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model,' ',jsh_material.Color)) as mName from jsh_depotitem inner join jsh_material " +
|
||||
" on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId ="+ headerId);
|
||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setPageList(query.list());
|
||||
@@ -164,7 +164,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
||||
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
|
||||
StringBuffer queryString = new StringBuffer();
|
||||
queryString.append("select group_concat(CAST(dt.HeaderId AS CHAR)) as ids from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where m.`Name` "+
|
||||
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%' or m.Mfrs like '%" + materialParam + "%'");
|
||||
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%' or m.Color like '%" + materialParam + "%'");
|
||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setPageList(query.list());
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
||||
workbook = Workbook.createWorkbook(os);
|
||||
WritableSheet sheet = workbook.createSheet("信息报表", 0);
|
||||
//增加列头
|
||||
String[] colunmName = {"品名","类型","型号","制造商","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"};
|
||||
String[] colunmName = {"品名","类型","型号","颜色","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"};
|
||||
for(int i = 0 ;i < colunmName.length;i ++) {
|
||||
sheet.setColumnView(i, 10);
|
||||
sheet.addCell(new Label(i, 0, colunmName[i]));
|
||||
@@ -102,7 +102,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
||||
sheet.addCell(new Label(j++,i, material.getName()));
|
||||
sheet.addCell(new Label(j++,i, material.getMaterialCategory().getName()));
|
||||
sheet.addCell(new Label(j++,i, material.getModel() == null ?"": material.getModel()));
|
||||
sheet.addCell(new Label(j++,i, material.getMfrs() == null ?"": material.getMfrs()));
|
||||
sheet.addCell(new Label(j++,i, material.getColor() == null ?"": material.getColor()));
|
||||
sheet.addCell(new Label(j++,i, material.getStandard() == null ?"": material.getStandard()));
|
||||
sheet.addCell(getLabelInfo(cellInfo,j++,i, material.getSafetyStock() == null ?"": material.getSafetyStock().toString(),material));
|
||||
sheet.addCell(new Label(j++,i, material.getUnit() == null ?"": material.getUnit()));
|
||||
@@ -242,7 +242,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
||||
|
||||
Log.infoFileSync("==================excel表格中第" + totalRow + "行的第 " + cellIndex + "列的值为" + cell.getStringCellValue());
|
||||
|
||||
//每行中数据顺序 "品名","类型","型号","制造商","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"
|
||||
//每行中数据顺序 "品名","类型","型号","颜色","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"
|
||||
switch(cellIndex) {
|
||||
case MaterialConstants.BusinessForExcel.EXCEL_NAME :
|
||||
String materialName = cell.getStringCellValue();
|
||||
@@ -268,13 +268,13 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
|
||||
}
|
||||
material.setModel(model);
|
||||
break;
|
||||
case MaterialConstants.BusinessForExcel.EXCEL_MFRS :
|
||||
String mfrs = cell.getStringCellValue();
|
||||
if(null == mfrs || "".equals(mfrs)) {
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>列表没有填写(制造商)信息");
|
||||
case MaterialConstants.BusinessForExcel.EXCEL_COLOR :
|
||||
String color = cell.getStringCellValue();
|
||||
if(null == color || "".equals(color)) {
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>列表没有填写(颜色)信息");
|
||||
break;
|
||||
}
|
||||
material.setMfrs(mfrs);
|
||||
material.setColor(color);
|
||||
break;
|
||||
case MaterialConstants.BusinessForExcel.EXCEL_STANDARD :
|
||||
String standard = cell.getStringCellValue();
|
||||
|
||||
@@ -32,9 +32,9 @@ public interface MaterialConstants
|
||||
public static final int EXCEL_CATEGORY = 1;
|
||||
|
||||
/**
|
||||
* 制造商
|
||||
* 颜色
|
||||
*/
|
||||
public static final int EXCEL_MFRS = 2;
|
||||
public static final int EXCEL_COLOR = 2;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
|
||||
Reference in New Issue
Block a user