优化系统,解决单据选择商品的bug

This commit is contained in:
季圣华
2020-02-17 21:09:41 +08:00
parent 4b61eb59ee
commit 2e7638fe07
7 changed files with 70 additions and 46 deletions

View File

@@ -221,12 +221,6 @@ public class DepotItemController {
public String getOtherInfo(String[] mpArr, DepotItemVo4WithInfoEx diEx)throws Exception {
String materialOther = "";
for (int i = 0; i < mpArr.length; i++) {
if (mpArr[i].equals("颜色")) {
materialOther = materialOther + ((diEx.getMColor() == null || diEx.getMColor().equals("")) ? "" : "(" + diEx.getMColor() + ")");
}
if (mpArr[i].equals("规格")) {
materialOther = materialOther + ((diEx.getMStandard() == null || diEx.getMStandard().equals("")) ? "" : "(" + diEx.getMStandard() + ")");
}
if (mpArr[i].equals("制造商")) {
materialOther = materialOther + ((diEx.getMMfrs() == null || diEx.getMMfrs().equals("")) ? "" : "(" + diEx.getMMfrs() + ")");
}

View File

@@ -248,7 +248,7 @@ public class MaterialController {
* @throws Exception
*/
@GetMapping(value = "/getMaterialByMeId")
public JSONObject getMaterialByMeId(@RequestParam("meId") long meId,
public JSONObject getMaterialByMeId(@RequestParam(value = "meId", required = false) Long meId,
@RequestParam("mpList") String mpList,
HttpServletRequest request) throws Exception{
JSONObject item = new JSONObject();

View File

@@ -362,6 +362,9 @@ public class MaterialService {
public List<MaterialVo4Unit> findBySelectWithBarCode(String q,Integer offset, Integer rows)throws Exception{
List<MaterialVo4Unit> list =null;
try{
if(StringUtil.isNotEmpty(q)) {
q = q.replace("'", "");
}
list= materialMapperEx.findBySelectWithBarCode(q, offset, rows);
}catch(Exception e){
JshException.readFail(logger, e);
@@ -372,6 +375,9 @@ public class MaterialService {
public int findBySelectWithBarCodeCount(String q)throws Exception{
int result=0;
try{
if(StringUtil.isNotEmpty(q)) {
q = q.replace("'", "");
}
result = materialMapperEx.findBySelectWithBarCodeCount(q);
}catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]",
@@ -712,10 +718,12 @@ public class MaterialService {
return stock;
}
public List<MaterialVo4Unit> getMaterialByMeId(long meId) {
public List<MaterialVo4Unit> getMaterialByMeId(Long meId) {
List<MaterialVo4Unit> result = new ArrayList<MaterialVo4Unit>();
try{
result= materialMapperEx.getMaterialByMeId(meId);
if(meId!=null) {
result= materialMapperEx.getMaterialByMeId(meId);
}
}catch(Exception e){
JshException.readFail(logger, e);
}