|
|
@@ -101,6 +101,9 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
case GetInfoByMaterial:
|
|
|
remap = GetInfoByMaterial(json);
|
|
|
break;
|
|
|
+ case GetPCBABySN:
|
|
|
+ remap = GetPCBABySN(json);
|
|
|
+ break;
|
|
|
case GoMo:
|
|
|
remap = GoMo(json);
|
|
|
break;
|
|
|
@@ -246,11 +249,11 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
String TIME_BEGIN="";
|
|
|
String TIME_END="";
|
|
|
String oErrMessage="";
|
|
|
- if(map.get("MA_CUSTNAME")==null){
|
|
|
- oErrMessage = "客户名称不能为空";
|
|
|
- rmap.put("oErrMessage",oErrMessage);
|
|
|
- return rmap;
|
|
|
- }
|
|
|
+// if(map.get("MA_CUSTNAME")==null){
|
|
|
+// oErrMessage = "客户名称不能为空";
|
|
|
+// rmap.put("oErrMessage",oErrMessage);
|
|
|
+// return rmap;
|
|
|
+// }
|
|
|
if(map.get("TIME_BEGIN")==null){
|
|
|
oErrMessage = "开始时间不能为空";
|
|
|
rmap.put("oErrMessage",oErrMessage);
|
|
|
@@ -264,8 +267,13 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
ma_custname=map.get("MA_CUSTNAME").toString();
|
|
|
TIME_BEGIN=map.get("TIME_BEGIN").toString();
|
|
|
TIME_END=map.get("TIME_END").toString();
|
|
|
- SqlRowList rs=baseDao.queryForRowSet("select ms_sncode,to_char(ms_enddate,'yyyy-mm-dd hh24:mi:ss')ms_enddate from makeserial left join make on ma_code=ms_makecode where ms_enddate between to_date('"+TIME_BEGIN+"','yyyy-mm-dd') " +
|
|
|
- "and to_date('"+TIME_END+"','yyyy-mm-dd') and ma_custname='"+ma_custname+"'");
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select sn from DeliveryIn " +
|
|
|
+ " where DELIVERY between to_date('"+TIME_BEGIN+"','yyyy-mm-dd') " +
|
|
|
+ "and to_date('"+TIME_END+"','yyyy-mm-dd') union select sn from Deliveryout " +
|
|
|
+ "where DELIVERY between to_date('"+TIME_BEGIN+"','yyyy-mm-dd') " +
|
|
|
+ "and to_date('"+TIME_END+"','yyyy-mm-dd') union select asd_sn from aftersaledet " +
|
|
|
+ "where ASD_FINISHTIME between to_date('"+TIME_BEGIN+"','yyyy-mm-dd') " +
|
|
|
+ "and to_date('"+TIME_END+"','yyyy-mm-dd') ");
|
|
|
rmap.put("data",rs.getResultList());
|
|
|
return rmap;
|
|
|
}
|
|
|
@@ -355,6 +363,28 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
return rmap;
|
|
|
}
|
|
|
|
|
|
+ private Map<Object,Object> GetPCBABySN(JSONObject map){
|
|
|
+ Object AE_MASTER = baseDao.getFieldDataByCondition("APIEMPLOYEE", "AE_MASTER", "AE_KEY='" + accessKey1 + "'");
|
|
|
+ Map<Object, Object> rmap = new HashMap<Object, Object>();
|
|
|
+ String iSN="";
|
|
|
+ String oErrMessage="";
|
|
|
+ if(map.get("iSN")==null){
|
|
|
+ oErrMessage = "SN不能为空";
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ iSN=map.get("iSN").toString();
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select ms_firstsn from "+AE_MASTER+".makeserial where ms_sncode='"+iSN+"' order by ms_id desc");
|
|
|
+ if(rs.next()){
|
|
|
+ rs=baseDao.queryForRowSet("select cm_barcode from "+AE_MASTER+".craftmaterial left join product on cm_fsoncode=pr_code " +
|
|
|
+ "where cm_firstsn='"+rs.getString("ms_firstsn")+"' and cm_status=0 and (pr_detail like '%PCBA%' or pr_detail like '%主板%')");
|
|
|
+ if(rs.next()){
|
|
|
+ rmap.put("oPCBA",rs.getString("cm_barcode"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+
|
|
|
private Map<Object,Object> GetInfoByMaterial(JSONObject map){
|
|
|
Object AE_MASTER = baseDao.getFieldDataByCondition("APIEMPLOYEE", "AE_MASTER", "AE_KEY='" + accessKey1 + "'");
|
|
|
Map<Object, Object> rmap = new HashMap<Object, Object>();
|