Преглед изворни кода

Merge remote-tracking branch 'origin/mes_malata_prod' into mes_malata_prod

XiaoST пре 6 година
родитељ
комит
3519364953

+ 11 - 12
src/com/uas/mes/common/dao/impl/SysnavigationDaoImpl.java

@@ -1,15 +1,5 @@
 package com.uas.mes.common.dao.impl;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.dao.EmptyResultDataAccessException;
-import org.springframework.jdbc.core.BeanPropertyRowMapper;
-import org.springframework.stereotype.Repository;
-
 import com.uas.mes.common.dao.SysnavigationDao;
 import com.uas.mes.common.data.BaseDao;
 import com.uas.mes.common.data.JSONTree;
@@ -17,6 +7,15 @@ import com.uas.mes.common.entity.Employee;
 import com.uas.mes.common.entity.EmpsJobs;
 import com.uas.mes.common.entity.SysNavigation;
 import com.uas.mes.common.support.SystemSession;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.dao.EmptyResultDataAccessException;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
 @Repository("sysnavigationDao")
 public class SysnavigationDaoImpl extends BaseDao implements SysnavigationDao {
@@ -120,9 +119,9 @@ public class SysnavigationDaoImpl extends BaseDao implements SysnavigationDao {
 				where = "sn_using=1 and case when sn_isleaf='T' then nvl(sn_url,' ') else 'T' end <> ' '";
 			}
 			if (!"admin".equals(employee.getEm_type())) {
-				where += " and (case when sn_isleaf='T' then nvl(sn_caller,' ') else 'T' end = ' ' or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from positionpower where pp_joid=";
+				where += " and (case when sn_isleaf='T' then nvl(sn_caller,' ') else 'T' end = ' ' or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from positionpower where pp_see <> 0 and pp_joid=";
 				where += employee.getEm_defaulthsid() + ")";
-				where += " or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from personalpower where pp_emid=";
+				where += " or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from personalpower where pp_see <> 0 and pp_emid=";
 				where += employee.getEm_id() + "))";
 			}
 			if (search.contains("&&")) {

+ 2 - 2
src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

@@ -603,7 +603,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 				showSmtError(APIErrorCode.BUSINESS_FAILED,"不允许接同一个料卷号",handleType,linecode,location,ps_prodcode,"料卷"+bar_code,bool,table);
 			}
 		}
-		rs1=baseDao.queryForRowSet("select bar_prodcode,bar_place,bar_remain,bar_code from barcode where bar_code=?",bar_code);
+		rs1=baseDao.queryForRowSet("select bar_prodcode,nvl(bar_place,1)bar_place,bar_remain,bar_code from barcode where bar_code=?",bar_code);
 		if(rs1.next()){
 			rs = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder,psl_id from productsmtlocation "
 					+" where psl_psid=? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),rs1.getString("bar_prodcode"),rs1.getString("bar_prodcode"));
@@ -741,7 +741,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 			showSmtError(APIErrorCode.BUSINESS_FAILED,"站位未上料无需换料",handleType,linecode,location,ps_prodcode,"",bool,table);
 		}
 		
-		rs2 = baseDao.queryForRowSet("select bar_remain,bar_place,bar_prodcode,bar_code from barcode where bar_code=?",bar_code);
+		rs2 = baseDao.queryForRowSet("select bar_remain,nvl(bar_place,1)bar_place,bar_prodcode,bar_code from barcode where bar_code=?",bar_code);
 		if(rs2.next()){
 			rs = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder,psl_id from productsmtlocation "
 					+" where psl_psid=? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),rs2.getString("bar_prodcode"),rs2.getString("bar_prodcode"));

+ 1 - 1
src/com/uas/mes/pm/service/impl/SNBatchServiceImpl.java

@@ -105,7 +105,7 @@ public class SNBatchServiceImpl implements SNBatchService {
 					" max(ms_firstsn)ms_firstsn,max(ms_prodcode)ms_prodcode,max(ms_makecode)ms_makecode,max(MS_SALECODE)MS_SALECODE"+
 					",max(MS_BADTIMES)MS_BADTIMES,max(MS_IMEI1)MS_IMEI1,max(MS_IMEI2)MS_IMEI2,max(MS_MAC)MS_MAC,max(MS_BT)MS_BT,max(SIR_REMARK)SIR_REMARK,"+
 					" max(SIR_SOFTVER)SIR_SOFTVER,"+
-					" max(case when pr_detail like '%板%' then cm_barcode else ' ' end) 主板"+
+					" max(case when pr_detail like '%板%' then cm_barcode else ' ' end) 主板"+
 					",max(case when pr_detail like '%屏%' then cm_barcode else ' ' end) 液晶屏"+
 					",max(case when pr_detail like '%电池%' then cm_barcode else ' ' end) 电池"+
 					",max(case when pr_detail like '%KEY%' then cm_barcode else ' ' end)  KEY"+