|
|
@@ -0,0 +1,334 @@
|
|
|
+package com.uas.eis.serviceImpl;
|
|
|
+
|
|
|
+import com.uas.eis.core.config.SpObserver;
|
|
|
+import com.uas.eis.dao.BaseDao;
|
|
|
+import com.uas.eis.dao.SqlRowList;
|
|
|
+import com.uas.eis.entity.ErrorMessage;
|
|
|
+import com.uas.eis.entity.HelperType;
|
|
|
+import com.uas.eis.exception.ApiSystemException;
|
|
|
+import com.uas.eis.sdk.entity.ApiResult;
|
|
|
+import com.uas.eis.service.MESHelperService;
|
|
|
+import com.uas.eis.utils.*;
|
|
|
+import net.sf.json.JSONObject;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class MESHelperServiceImpl implements MESHelperService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BaseDao baseDao;
|
|
|
+
|
|
|
+ @Value("${spring.datasource.username}")
|
|
|
+ private String username;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Map<Object, Object>> DLLMain(String accessKey, String requestId, String data) {
|
|
|
+ String AE_MASTER = checkAccessKey(accessKey, requestId);
|
|
|
+ SpObserver.putSp(AE_MASTER);
|
|
|
+ Map<Object, Object> map = BaseUtil.parseFormStoreToMap(data);
|
|
|
+ //解析map
|
|
|
+ if(!StringUtil.hasText(map.get("type"))){
|
|
|
+ throw new ApiSystemException(new ApiResult(ErrorMessage.BUSINESS_TYPENULL,requestId));
|
|
|
+ }
|
|
|
+ if(!StringUtil.hasText(map.get("detail"))){
|
|
|
+ throw new ApiSystemException(new ApiResult(ErrorMessage.BUSINESS_DATAILLEGAL,requestId));
|
|
|
+ }
|
|
|
+ String type = map.get("type").toString();
|
|
|
+ HelperType helperType = HelperType.getTypeByCode(type);
|
|
|
+ if(null == helperType){
|
|
|
+ throw new ApiSystemException(new ApiResult(ErrorMessage.BUSINESS_TYPEILLEGAL,requestId));
|
|
|
+ }
|
|
|
+ int err = 0;
|
|
|
+ //返回值
|
|
|
+ List<Map<Object, Object>> remap = new ArrayList<>();
|
|
|
+ switch(helperType){
|
|
|
+ case UploadBaraccept:
|
|
|
+ remap = UploadBaraccept(map.get("detail").toString());
|
|
|
+ break;
|
|
|
+ case GetBaraccept:
|
|
|
+ remap = GetBaraccept(map.get("detail").toString());
|
|
|
+ break;
|
|
|
+ case GetPuOrder:
|
|
|
+ remap = GetPuOrder(map.get("detail").toString());
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ err = -1;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if(err == -1){
|
|
|
+ throw new ApiSystemException(new ApiResult(ErrorMessage.BUSINESS_TYPEILLEGAL,requestId));
|
|
|
+ }
|
|
|
+ SpObserver.putSp(username);
|
|
|
+ return remap;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<Map<Object, Object>> UploadBaraccept(String data)
|
|
|
+ {
|
|
|
+ List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
|
|
|
+ List<Map<Object, Object>> relist = new ArrayList<>();
|
|
|
+ SqlRowList rs=null;
|
|
|
+ String remark = "";
|
|
|
+ for (Map<Object, Object> map : maps) {
|
|
|
+
|
|
|
+ Map<Object, Object> remap = new HashMap<>();
|
|
|
+ if(map.size()==0){
|
|
|
+ remark = "参数不完整,请检查";
|
|
|
+ remap.put("remark",remark);
|
|
|
+ relist.add(remap);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ rs=baseDao.queryForRowSet("select ban_id from baracceptnotify where ban_barcode='"+map.get("ban_barcode")+"'");
|
|
|
+ map.put("ban_id",baseDao.getSeqId("baracceptnotify_seq"));
|
|
|
+ if(rs.next()){
|
|
|
+ remark = "["+map.get("ban_barcode")+"]重复";
|
|
|
+ remap.put("remark",remark);
|
|
|
+ }else{
|
|
|
+ try {
|
|
|
+ String sql=SqlUtil.getInsertSqlByMap(map,"BARACCEPTNOTIFY");
|
|
|
+ baseDao.execute(SqlUtil.getInsertSqlByMap(map,"BARACCEPTNOTIFY"));
|
|
|
+ remap.put("result","["+map.get("ban_barcode").toString()+"]OK");
|
|
|
+ remap.put("remark",remark);
|
|
|
+ }catch (Exception e){
|
|
|
+ remap.put("result","NG");
|
|
|
+ remap.put("remark",e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ relist.add(remap);
|
|
|
+ }
|
|
|
+ return relist;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<Map<Object, Object>> GetPuOrder(String data){
|
|
|
+ Map<Object, Object> map = BaseUtil.parseFormStoreToMap(data);
|
|
|
+ String pucode=map.get("pucode").toString();
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select pu_code,pd_detno,pd_prodcode,nvl(pd_qty,0)pd_qty,nvl(pd_yqty,0)pd_yqty,nvl(pd_acceptqty,0)pd_acceptqty from purchase left join purchasedetail on pu_id=pd_puid where pu_code='"+pucode+"' and pu_vendcode='001.003'");
|
|
|
+ List<Map<Object, Object>> relist = new ArrayList<>();
|
|
|
+ while (rs.next()){
|
|
|
+ Map<Object, Object> remap = new HashMap<>();
|
|
|
+ remap.put("pu_code",rs.getString("pu_code"));
|
|
|
+ remap.put("pd_detno",rs.getString("pd_detno"));
|
|
|
+ remap.put("pd_prodcode",rs.getString("pd_prodcode"));
|
|
|
+ remap.put("pd_qty",rs.getString("pd_qty"));
|
|
|
+ remap.put("pd_yqty",rs.getString("pd_yqty"));
|
|
|
+ remap.put("pd_acceptqty",rs.getString("pd_acceptqty"));
|
|
|
+ relist.add(remap);
|
|
|
+ }
|
|
|
+ return relist;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<Map<Object, Object>> GetBaraccept(String data)
|
|
|
+ {
|
|
|
+ Map<Object, Object> map = BaseUtil.parseFormStoreToMap(data);
|
|
|
+ Map<Object, Object> remap = new HashMap<>();
|
|
|
+ List<Map<Object, Object>> relist = new ArrayList<>();
|
|
|
+ String code=baseDao.sGetMaxNumber("VendAcceptNotify",0);
|
|
|
+ String sendcode=map.get("sendcode").toString();
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select an_code from AcceptNotify where an_sendcode='"+sendcode+"'");
|
|
|
+ if(rs.next()){
|
|
|
+ remap.put("result","NG");
|
|
|
+ remap.put("remark","["+sendcode+"]已经生成单据["+rs.getString("an_code")+"]");
|
|
|
+ relist.add(remap);
|
|
|
+ return relist;
|
|
|
+ }
|
|
|
+ rs=baseDao.queryForRowSet("select ban_id from baracceptnotify where ban_sendcode='"+sendcode+"'");
|
|
|
+ if(rs.next()){
|
|
|
+ int an_id=baseDao.getSeqId("AcceptNotify_seq");
|
|
|
+ baseDao.execute("insert into AcceptNotify(AN_ID, AN_CODE, AN_DATE, AN_VENDCODE,AN_VENDNAME, AN_BUYERID, AN_CURRENCY, AN_RATE, AN_RECORDER, AN_INDATE, AN_STATUSCODE, AN_STATUS, AN_SOURCE," +
|
|
|
+ "AN_PAYMENTCODE, AN_PAYMENT, AN_BUYER, AN_SENDCODE, AN_SENDSTATUS, AN_RECEIVECODE, AN_RECEIVENAME)" +
|
|
|
+ "select '"+an_id+"',A.* from (select '"+code+"' an_code,sysdate AN_DATE,max(pu_vendcode),max(pu_vendname) ,max(ve_id),max(purchase.PU_CURRENCY),max(purchase.PU_RATE),max(ve_shortname)||'@vendor'," +
|
|
|
+ "sysdate AN_indate,'ENTERING','在录入','VENDOR',max(PU_PAYMENTSCODE),max(PU_PAYMENTS),max(pu_buyername),'"+map.get("sendcode")+"' an_sendcode,'待上传',max(ve_code),max(ve_name) from BARACCEPTNOTIFY " +
|
|
|
+ "left join purchase on ban_pucode=pu_code left join product on pr_code=ban_prodcode left join vendor on ve_code=pu_vendcode where ban_sendcode='"+sendcode+"' )A");
|
|
|
+
|
|
|
+ baseDao.execute("insert into ACCEPTNOTIFYDETAIL(AND_ID, AND_ANID, AND_DETNO, AND_ORDERID, AND_ORDERCODE, AND_ORDERDETNO, AND_PRODCODE, AND_INQTY)" +
|
|
|
+ "select ACCEPTNOTIFYDETAIL_seq.nextval,"+an_id+",rownum,A.* from (select max(pd_id),ban_pucode,ban_pudetno,ban_prodcode,sum(ban_qty) from BARACCEPTNOTIFY " +
|
|
|
+ "left join purchase on ban_pucode=pu_code left join purchasedetail on pu_id=pd_puid and ban_pudetno=pd_detno left join product on pr_code=ban_prodcode where ban_sendcode='"+sendcode+"' group by ban_prodcode,ban_pudetno,ban_pucode)A");
|
|
|
+
|
|
|
+ baseDao.execute("update BARACCEPTNOTIFY set (ban_anid,BAN_ANCODE, BAN_ANDID, BAN_ANDDETNO)=(select max(an_id),max(an_code),max(and_id),max(and_detno) from ACCEPTNOTIFYDETAIL " +
|
|
|
+ "left join ACCEPTNOTIFY on and_anid=an_id where an_sendcode=ban_sendcode " +
|
|
|
+ "and and_prodcode=ban_prodcode and ban_pudetno=and_orderdetno and and_ordercode=ban_pucode group by ban_pudetno) where ban_sendcode='"+sendcode+"'");
|
|
|
+ String errMsg=submit("VendAcceptNotify",an_id);
|
|
|
+ if(!errMsg.equals("")){
|
|
|
+ remap.put("result","NG");
|
|
|
+ remap.put("remark",errMsg);
|
|
|
+ relist.add(remap);
|
|
|
+ //如果单据有异常清除条码
|
|
|
+ delete("VendAcceptNotify",an_id);
|
|
|
+ return relist;
|
|
|
+ }
|
|
|
+ baseDao.execute("update acceptNotify set an_status='已审核',an_statuscode='AUDITED' where an_id="+an_id);
|
|
|
+ remap.put("result","生成单据成功");
|
|
|
+ remap.put("code",code);
|
|
|
+ relist.add(remap);
|
|
|
+ }else{
|
|
|
+ remap.put("result","NG");
|
|
|
+ remap.put("remark","单据["+sendcode+"]未上传条码");
|
|
|
+ relist.add(remap);
|
|
|
+ return relist;
|
|
|
+ }
|
|
|
+ return relist;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String submit(String caller, int id) {
|
|
|
+ String ErrMsg="";
|
|
|
+ boolean bool = baseDao.isDBSetting("BarCodeSetting", "unLimitSendQty");
|
|
|
+ Object status = baseDao.getFieldDataByCondition("acceptNotify", "an_statuscode", "an_id=" + id);
|
|
|
+ Object[] sendcode = baseDao.getFieldsDataByCondition("acceptNotify", "an_sendcode,an_remark", "an_id=" + id);
|
|
|
+ if (sendcode[0] == null || sendcode[0].equals("")) {
|
|
|
+ return ErrMsg="送货通知单号不允许为空";
|
|
|
+ }
|
|
|
+ if (baseDao.getCount("select 1 from acceptNotify where an_sendcode='" + sendcode + "'") > 1) {
|
|
|
+ return ErrMsg="送货单号" + sendcode + "不允许重复";
|
|
|
+ }
|
|
|
+ SqlRowList rs = null;
|
|
|
+ //通知单数量不能大于采购单数量-已转通知数之和
|
|
|
+ if (!bool) {
|
|
|
+ Double wqty = 0.0, and_qty = 0.0;
|
|
|
+ SqlRowList rsXq = baseDao.queryForRowSet(" select nvl(pd_qty,0)-nvl(pd_yqty,0) wqty,nvl(and_inqty,0) and_inqty from purchasedetail left join acceptnotifydetail on and_ordercode = pd_code "
|
|
|
+ + " and and_orderdetno = pd_detno where and_anid = ? and nvl(pd_qty,0)-nvl(pd_yqty,0)>0 and nvl(pd_qty,0)-nvl(pd_yqty,0)-nvl(and_inqty,0)<0", id);
|
|
|
+ if (rsXq.next()) {
|
|
|
+ wqty = rsXq.getDouble("wqty");
|
|
|
+ and_qty = rsXq.getDouble("and_inqty");
|
|
|
+ }
|
|
|
+ rs = baseDao.queryForRowSet("select wm_concat(and_detno) and_detno from acceptNotifydetail where and_anid = ? and exists (select 1 from purchasedetail "
|
|
|
+ + " where pd_code = and_ordercode and pd_detno = and_orderdetno and (pd_qty - nvl(pd_yqty,0)) < nvl(and_inqty,0)) ", id);
|
|
|
+ if (rs.next() && rs.getString("and_detno") != null) {
|
|
|
+ return ErrMsg="未交数量不能大于本批数量.<br>序号" + rs.getString("and_detno") + (wqty > 0 ? (":待交数" + wqty) : "") + (and_qty > 0 ? ("本批数量" + and_qty + ".") : "");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ rs = baseDao.queryForRowSet("select wm_concat(and_detno) and_detno from acceptNotifydetail left join purchasedetail on pd_code = and_ordercode and pd_detno = and_orderdetno left join purchase on pd_puid = pu_id "
|
|
|
+ + " where and_anid ='"+id+"' and not exists(select 1 from acceptnotify where nvl(an_vendcode, ' ') = nvl(pu_vendcode,' ') and nvl(an_vendname,' ') = nvl(pu_vendname,' ') and nvl(an_currency,' ') = nvl(pu_currency,' ') and nvl(pu_buyername,' ') = nvl(an_buyer,' ') and nvl(pu_payments,' ') = nvl(an_payment,' ') and nvl(pu_receivename,' ') = nvl(an_receivename,' ') and an_id='"+id+"')");
|
|
|
+ /*if (rs.next() && rs.getString("and_detno") != null) {
|
|
|
+ return ErrMsg="请检查采购单+序号对应的供应编号、应付供应商、币别、采购员、付款方式、应付供应商是否和主表一致,序号" + rs.getString("and_detno");
|
|
|
+ }*/
|
|
|
+ /*rs = baseDao.queryForRowSet("select wm_concat(and_detno) and_detno from acceptnotifydetail where and_anid =? and and_barqty>0 and nvl(and_barqty,0)<>nvl(and_inqty,0)",id);
|
|
|
+ if (rs.next() && rs.getString("and_detno") != null){
|
|
|
+ BaseUtil.showError("序号"+rs.getString("and_detno")+"存在条码,条码数量不等于采购数量");
|
|
|
+ }*/
|
|
|
+ rs = baseDao.queryForRowSet("select wm_concat(and_detno)and_detno from (select max(AND_INQTY)AND_INQTY,nvl(sum(ban_qty),0)ban_qty,and_detno from acceptnotifydetail " +
|
|
|
+ "left join BARACCEPTNOTIFY on ban_andid=and_id where and_anid =? group by and_detno) where AND_INQTY<>ban_qty", id);
|
|
|
+ if (rs.next() && rs.getString("and_detno") != null) {
|
|
|
+ return ErrMsg="序号" + rs.getString("and_detno") + "条码数量不等于采购数量";
|
|
|
+ }
|
|
|
+ rs = baseDao.queryForRowSet("select wm_concat(and_detno) and_detno from acceptnotifydetail left join product on pr_code = and_prodcode where and_anid =? and nvl(pr_tracekind,0) <> 0 and nvl(and_barqty,0) = 0", id);
|
|
|
+ if (rs.next() && rs.getString("and_detno") != null) {
|
|
|
+ return ErrMsg="序号" + rs.getString("and_detno") + "是管控物料,条码数量不允许为0";
|
|
|
+ }
|
|
|
+ //updatePrice(id);
|
|
|
+ // 判断是否超采购数收料
|
|
|
+ if (!bool) {
|
|
|
+ checkQty(id);
|
|
|
+ }
|
|
|
+ // 判断批号是否重复
|
|
|
+ String errRows = baseDao
|
|
|
+ .getJdbcTemplate()
|
|
|
+ .queryForObject(
|
|
|
+ "select wmsys.wm_concat(and_detno) from acceptnotifydetail where and_anid=? and (and_batchcode,and_prodcode,and_whcode) in (select and_batchcode,and_prodcode,and_whcode from (select count(1) c, and_batchcode,and_prodcode,and_whcode from acceptnotifydetail where (and_batchcode,and_prodcode,and_whcode) in (select and_batchcode,and_prodcode,and_whcode from acceptnotifydetail where and_anid=?) group by and_batchcode,and_prodcode,and_whcode) where c > 1)",
|
|
|
+ String.class, id, id);
|
|
|
+ if (errRows != null) {
|
|
|
+ return ErrMsg="批号重复,行:" + errRows;
|
|
|
+ } else {
|
|
|
+ errRows = baseDao
|
|
|
+ .getJdbcTemplate()
|
|
|
+ .queryForObject(
|
|
|
+ "select wmsys.wm_concat(and_detno) from acceptnotifydetail where and_anid=? and (and_batchcode,and_prodcode,and_whcode) in (select ba_code,ba_prodcode,ba_whcode from batch)",
|
|
|
+ String.class, id);
|
|
|
+ if (errRows != null) {
|
|
|
+ return ErrMsg="批号重复,行:" + errRows;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String notEnoughSale = baseDao
|
|
|
+ .getJdbcTemplate()
|
|
|
+ .queryForObject(
|
|
|
+ "select wmsys.wm_concat('<br>行:'||and_detno||',PO数:'||nvl(pd_qty,0)||',通知单已提交数:'||nvl(and_commitedqty,0)||',本次数:'||nvl(and_inqty,0)) from (select and_detno,and_inqty,(select sum(nvl(and_inqty,0)) from acceptnotifydetail left join acceptnotify on an_id=and_anid where and_ordercode=A.and_ordercode and and_orderdetno=A.and_orderdetno and an_statuscode<>'ENTERING') and_commitedqty,nvl(pd_qty,0)+nvl(pd_backqty,0) pd_qty from acceptnotifydetail A left join purchasedetail on pd_code=and_ordercode and pd_detno=and_orderdetno where and_anid=?) where nvl(pd_qty,0)<nvl(and_commitedqty,0)+nvl(and_inqty,0)",
|
|
|
+ String.class, id);
|
|
|
+ if (notEnoughSale != null && !bool) {
|
|
|
+ return ErrMsg="数量超过了PO数量,提交失败:<br>" + notEnoughSale;
|
|
|
+ }
|
|
|
+ baseDao.execute("update acceptNotify set an_status='已提交',an_statuscode='COMMITED' where an_id="+id);
|
|
|
+ return ErrMsg;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void delete(String caller, int id) {
|
|
|
+
|
|
|
+ //删除Dispatch
|
|
|
+ baseDao.deleteById("acceptNotify", "an_id", id);
|
|
|
+ //删除DispatchDetail
|
|
|
+ baseDao.deleteById("acceptNotifyDetail", "and_anid", id);
|
|
|
+ //删除DispatchDetail
|
|
|
+ /*baseDao.deleteById("baracceptNotify", "ban_anid", id);*/
|
|
|
+ baseDao.deleteByCondition("baracceptNotify", " ban_anid = " + id + "and nvl(ban_pdid,0)=0");
|
|
|
+ }
|
|
|
+
|
|
|
+ public void confirmDelivery(String caller, int id) {
|
|
|
+ // 只能对状态为[已提交]的订单进行审核操作!
|
|
|
+ Object status = baseDao.getFieldDataByCondition("AcceptNotify", "an_statuscode", "an_id=" + id);
|
|
|
+ int count = baseDao.getCount("select count(1) cn from baracceptnotify where ban_anid = " + id + " and nvl(ban_printstatus,0) <> -1");
|
|
|
+ if (count > 0) {
|
|
|
+ //BaseUtil.showError("存在条码未打印,不允许确认送货");
|
|
|
+ }
|
|
|
+ // 执行审核操作
|
|
|
+ //baseDao.audit("AcceptNotify", "an_id=" + id, "an_status", "an_statuscode");
|
|
|
+ // 记录操作
|
|
|
+ //baseDao.logger.audit(caller, "an_id", id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否超采购数收料
|
|
|
+ *
|
|
|
+ * @author yingp 2013-4-17 9:08:59
|
|
|
+ */
|
|
|
+ public void checkQty(int id) {
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet(
|
|
|
+ "SELECT and_ordercode,and_orderdetno,sum(and_inqty) and_inqty FROM AcceptNotifyDetail where and_anid=? group by and_ordercode,and_orderdetno",
|
|
|
+ id);
|
|
|
+ String code = null;
|
|
|
+ int detno = 0;
|
|
|
+ Object count = null;
|
|
|
+ boolean bool = false;
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
+ while (rs.next()) {
|
|
|
+ code = rs.getString("and_ordercode");
|
|
|
+ detno = rs.getInt("and_orderdetno");
|
|
|
+ count = baseDao.getFieldDataByCondition("AcceptNotifyDetail left join AcceptNotify on an_id=and_anid", "sum(and_inqty)",
|
|
|
+ "and_ordercode='" + code + "' and and_orderdetno=" + detno + " and an_statuscode in('AUDITED','TURNIN') and and_anid<>"
|
|
|
+ + id);
|
|
|
+ if (count != null) {
|
|
|
+ bool = baseDao.checkByCondition("PurchaseDetail", "pd_code='" + code + "' and pd_detno=" + detno
|
|
|
+ + " and nvl(pd_qty,0)+nvl(pd_backqty,0)<" + (Double.parseDouble(count.toString()) + rs.getDouble("and_inqty")));
|
|
|
+ if (!bool) {
|
|
|
+ sb.append("<br>");
|
|
|
+ sb.append("不能超采购数量收料,采购单号[");
|
|
|
+ sb.append(code);
|
|
|
+ sb.append("],明细行号[");
|
|
|
+ sb.append(detno);
|
|
|
+ sb.append("]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (sb.length() > 0) {
|
|
|
+ BaseUtil.showError(sb.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private String checkAccessKey(String accessKey,String requestId){
|
|
|
+ Object accessSecret_O = baseDao.getFieldDataByCondition("APIEMPLOYEE", "AE_SECRET", "AE_KEY='" + accessKey + "'");
|
|
|
+ Object AE_MASTER = baseDao.getFieldDataByCondition("APIEMPLOYEE", "AE_MASTER", "AE_KEY='" + accessKey + "'");
|
|
|
+ String accessSecret = accessSecret_O == null ? "" : accessSecret_O.toString();
|
|
|
+ // 检查KEY是否合理
|
|
|
+ if (StringUtils.isEmpty(accessKey) || StringUtils.isEmpty(accessSecret) || AE_MASTER== null || "".equals(AE_MASTER.toString())) {
|
|
|
+ ApiResult apiResult = new ApiResult(ErrorMessage.ACCESSKEY_ILLEGAL.getCode(),ErrorMessage.ACCESSKEY_ILLEGAL.getMessage(),requestId);
|
|
|
+ throw new ApiSystemException(apiResult);
|
|
|
+ }
|
|
|
+ return AE_MASTER.toString();
|
|
|
+ }
|
|
|
+}
|