|
|
@@ -126,6 +126,10 @@ public class StandardCraftServiceImpl implements StandardCraftService {
|
|
|
// 执行审核操作
|
|
|
baseDao.audit("StandardCraft", "sc_id=" + sc_id, "sc_status", "sc_statuscode",
|
|
|
"sc_auditdate", "sc_auditman");
|
|
|
+
|
|
|
+ //根据执行顺序的排序更新序号
|
|
|
+ baseDao.execute("update StandardCraftdetail a set sd_detno =(select rn from (select sd_stepno,row_number() over(order by sd_stepno asc) rn from StandardCraftdetail left join"
|
|
|
+ +" StandardCraft on sc_id=sd_scid where sc_id=?) b where a.sd_stepno=b.sd_stepno) where sd_scid=?",sc_id,sc_id);
|
|
|
baseDao.execute("update standardcraftdetail set (sd_nextstepcode,sd_nextstepname)= (select max(sd_stepcode),max(sd_stepname) from standardcraftdetail a where a.sd_scid=? and a.sd_detno=standardcraftdetail.sd_detno+1) where sd_scid=?",sc_id,sc_id);
|
|
|
baseDao.execute("update standardcraftdetail set sd_firststep=-1 where sd_scid=? and sd_detno =(select min(sd_detno) from standardcraftdetail where sd_scid = ?)",sc_id,sc_id);
|
|
|
baseDao.execute("update standardcraftdetail set sd_firststep= 0 where sd_scid=? and nvl(sd_firststep,0)=-1 and nvl(sd_detno,0) <> (select min(sd_detno) from standardcraftdetail where sd_scid = ? )",sc_id,sc_id);
|