Browse Source

修改账套

callm 1 year ago
parent
commit
5b86422251
1 changed files with 26 additions and 26 deletions
  1. 26 26
      src/main/java/com/uas/eis/serviceImpl/MESDataServiceImpl.java

+ 26 - 26
src/main/java/com/uas/eis/serviceImpl/MESDataServiceImpl.java

@@ -42,7 +42,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_STEPPASSED where sp_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("SP_ID"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_STEPPASSED where sp_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("SP_ID"));
 			remap.put("id",map.get("SP_ID"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -54,7 +54,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_STEPPASSED"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_STEPPASSED"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -79,7 +79,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_SNINFO where SI_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("SI_ID"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_SNINFO where SI_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("SI_ID"));
 			remap.put("id",map.get("SI_ID"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -91,7 +91,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_SNINFO"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_SNINFO"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -114,7 +114,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_MAKESNRELATION where ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("ID"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_MAKESNRELATION where ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("ID"));
 			remap.put("id",map.get("ID"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -126,7 +126,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_MAKESNRELATION"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_MAKESNRELATION"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -149,7 +149,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_MAKEBAD where MB_CODE=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MB_CODE"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_MAKEBAD where MB_CODE=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MB_CODE"));
 			remap.put("id",map.get("MB_CODE"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -161,7 +161,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_MAKEBAD"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_MAKEBAD"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -184,7 +184,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_MAKEBADREASON where MBR_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MBR_ID"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_MAKEBADREASON where MBR_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MBR_ID"));
 			remap.put("id",map.get("MBR_ID"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -196,7 +196,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_MAKEBADREASON"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_MAKEBADREASON"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -219,7 +219,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_PACKAGEDETAIL where PD_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MBR_ID"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_PACKAGEDETAIL where PD_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MBR_ID"));
 			remap.put("id",map.get("PD_ID"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -231,7 +231,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_PACKAGEDETAIL"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_PACKAGEDETAIL"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -254,7 +254,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_CRAFTMATERIAL where cm_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("cm_id"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_CRAFTMATERIAL where cm_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("cm_id"));
 			remap.put("id",map.get("cm_id"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -266,7 +266,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_CRAFTMATERIAL"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_CRAFTMATERIAL"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -289,7 +289,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".TEMP_OQCBATCHDETAIL where obd_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("obd_id"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".TEMP_OQCBATCHDETAIL where obd_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("obd_id"));
 			remap.put("id",map.get("obd_id"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -301,7 +301,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_OQCBATCHDETAIL"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_OQCBATCHDETAIL"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -324,7 +324,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".temp_inspectdata where id_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("id_id"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".temp_inspectdata where id_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("id_id"));
 			remap.put("id",map.get("id_id"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -336,7 +336,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".temp_inspectdata"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".temp_inspectdata"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -359,7 +359,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".temp_prodiomac where pim_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("pim_id"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".temp_prodiomac where pim_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("pim_id"));
 			remap.put("id",map.get("pim_id"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -371,7 +371,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".temp_prodiomac"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".temp_prodiomac"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -394,7 +394,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".temp_oqcitemsamples where OIS_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("OIS_ID"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".temp_oqcitemsamples where OIS_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("OIS_ID"));
 			remap.put("id",map.get("OIS_ID"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -406,7 +406,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".TEMP_OQCITEMSAMPLES"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".TEMP_OQCITEMSAMPLES"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -429,7 +429,7 @@ public class MESDataServiceImpl implements MESDataService {
 		for (Map<Object, Object> map : maps) {
 			Map<Object, Object> remap = new HashMap<>();
 			String remark = "";
-			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+Master+".temp_makeserial where ms_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("ms_id"));
+			int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from "+AE_MASTER+".temp_makeserial where ms_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("ms_id"));
 			remap.put("id",map.get("ms_id"));
 			if(cn>0){
 				map.put("T_STATUS","D");
@@ -441,7 +441,7 @@ public class MESDataServiceImpl implements MESDataService {
 			map.put("T_KEY",accessKey);
 			map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
 			try {
-				baseDao.execute(SqlUtil.getInsertSqlByMap(map,Master+".temp_makeserial"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(map,AE_MASTER+".temp_makeserial"));
 				remap.put("result","OK");
 				remap.put("remark",remark);
 			}catch (Exception e){
@@ -484,13 +484,13 @@ public class MESDataServiceImpl implements MESDataService {
 					mapb.put("BAR_BATCHQTY",mp.get("bar_batchqty"));
 					datab.add(mapb);
 				}
-				baseDao.execute(SqlUtil.getInsertSqlbyGridStore(datab,Master+".TEMP_BARCODE"));
+				baseDao.execute(SqlUtil.getInsertSqlbyGridStore(datab,AE_MASTER+".TEMP_BARCODE"));
 			}else if("DEL".equals(map.get("action"))){
 				Map<Object,Object> mapb = new HashMap<>();
 				mapb.put("ACTION","D");
 				mapb.put("ERPID",0);
 				mapb.put("BAR_OUTNO",map.get("outno"));
-				baseDao.execute(SqlUtil.getInsertSqlByMap(mapb,Master+".TEMP_BARCODE"));
+				baseDao.execute(SqlUtil.getInsertSqlByMap(mapb,AE_MASTER+".TEMP_BARCODE"));
 			}else{
 				return ApiResponse.failRsp(ErrorMessage.BUSINESS_ILLEGAL.getCode(),requestId,"传参操作类型:"+map.get("action")+"错误,只能是ADD或者DEL");
 			}