|
@@ -1640,6 +1640,7 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
Object StepCode = baseDao.getFieldDataByCondition("Makeserial", "ms_stepcode", "ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
Object StepCode = baseDao.getFieldDataByCondition("Makeserial", "ms_stepcode", "ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
String CurrentStep = GetStepCodeBySource(iSourceCode);
|
|
String CurrentStep = GetStepCodeBySource(iSourceCode);
|
|
Object BgCode = baseDao.getFieldDataByCondition("step", "nvl(st_badgroupcode,' ')", "st_code='" + CurrentStep + "'");
|
|
Object BgCode = baseDao.getFieldDataByCondition("step", "nvl(st_badgroupcode,' ')", "st_code='" + CurrentStep + "'");
|
|
|
|
+ String mscode = baseDao.getFieldDataByCondition("Makeserial", "ms_code", "ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'").toString();
|
|
Map<Object, Object> rmap = new HashMap<>();
|
|
Map<Object, Object> rmap = new HashMap<>();
|
|
switch (iResult)
|
|
switch (iResult)
|
|
{
|
|
{
|
|
@@ -1654,8 +1655,23 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- baseDao.updateByCondition("makebad", "mb_status=-1", "mb_sncode='" + iSN + "' and mb_makecode='" + iMakeCode + "' and mb_stepcode='" + CurrentStep + "' and mb_status=0");
|
|
|
|
|
|
+
|
|
String[] BadCode = iErrCode.split(",");
|
|
String[] BadCode = iErrCode.split(",");
|
|
|
|
+
|
|
|
|
+ if (!mscode.equals(iSN))
|
|
|
|
+ {
|
|
|
|
+ List<String> sqls = new ArrayList<>();
|
|
|
|
+ sqls.add("update makeserial set ms_sncode = '"+mscode+"',ms_beforesn = '' where ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
|
+ sqls.add(" update makesnlist set msl_status = '' where msl_sncode = '"+iSN+"' and msl_makecode = '"+iMakeCode+"' ");
|
|
|
|
+ sqls.add("delete makesnrelation where sn = '"+iSN+"'");
|
|
|
|
+ if (sqls!=null&&sqls.size()>0){
|
|
|
|
+ baseDao.execute(sqls);
|
|
|
|
+ }
|
|
|
|
+ iSN = mscode;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ baseDao.updateByCondition("makebad", "mb_status=-1", "mb_sncode='" + iSN + "' and mb_makecode='" + iMakeCode + "' and mb_stepcode='" + CurrentStep + "' and mb_status=0");
|
|
|
|
+
|
|
StringBuffer sql=new StringBuffer();
|
|
StringBuffer sql=new StringBuffer();
|
|
for (int i = 0; i < BadCode.length; i++)
|
|
for (int i = 0; i < BadCode.length; i++)
|
|
{
|
|
{
|