优化系统,解决单据选择商品的bug
This commit is contained in:
@@ -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() + ")");
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,9 @@
|
||||
</select>
|
||||
|
||||
<select id="findByIdWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
|
||||
select m.*,u.UName,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal from jsh_material m
|
||||
select m.*,u.UName,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
|
||||
me.wholesale_decimal, me.low_decimal
|
||||
from jsh_material m
|
||||
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
||||
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
where me.id = ${meId}
|
||||
@@ -220,12 +222,11 @@
|
||||
</select>
|
||||
|
||||
<select id="getMaterialByMeId" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList">
|
||||
select m.*,me.bar_code m_bar_code,u.uname unitName, mc.name categoryName, org.org_abr
|
||||
select m.*,me.bar_code m_bar_code,u.uname unitName, mc.name categoryName
|
||||
FROM jsh_material m
|
||||
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
|
||||
left join jsh_organization org on m.orga_id = org.id
|
||||
where 1=1
|
||||
<if test="meId != null">
|
||||
and me.id = ${meId}
|
||||
|
||||
Reference in New Issue
Block a user