|
@@ -2059,13 +2059,13 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
//判断工单号是否存在
|
|
//判断工单号是否存在
|
|
|
SqlRowList rs = baseDao.queryForRowSet("select * from make where ma_code=?",macode);
|
|
SqlRowList rs = baseDao.queryForRowSet("select * from make where ma_code=?",macode);
|
|
|
if(rs.next()){
|
|
if(rs.next()){
|
|
|
- int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from MAKESNRULEDETAIL where msd_makecode=? and msd_type='before'",Integer.class,macode);
|
|
|
|
|
|
|
+ int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from MAKESNRULEDETAIL where msd_makecode=? and msd_type='before' and nvl(msd_isadd,0) = 0",Integer.class,macode);
|
|
|
if(cn == 0){
|
|
if(cn == 0){
|
|
|
return ApiResponse.failRspResult("工单号:"+macode+",未生成镭雕条码!");
|
|
return ApiResponse.failRspResult("工单号:"+macode+",未生成镭雕条码!");
|
|
|
}
|
|
}
|
|
|
List<String> sqls = new ArrayList<>();
|
|
List<String> sqls = new ArrayList<>();
|
|
|
rs = baseDao.queryForRowSet("select * from (select MSD_SNCODE sncode from MAKESNRULEDETAIL where nvl(msd_isget,0)=0 " +
|
|
rs = baseDao.queryForRowSet("select * from (select MSD_SNCODE sncode from MAKESNRULEDETAIL where nvl(msd_isget,0)=0 " +
|
|
|
- " and msd_makecode=? and msd_type='before' order by msd_id) where rownum<=?",macode,combineqty);
|
|
|
|
|
|
|
+ " and msd_makecode=? and msd_type='before' and nvl(msd_isadd,0) = 0 order by msd_id) where rownum<=?",macode,combineqty);
|
|
|
if(rs.next()){
|
|
if(rs.next()){
|
|
|
if(rs.getResultList().size()<combineqty){
|
|
if(rs.getResultList().size()<combineqty){
|
|
|
return ApiResponse.failRspResult("工单号:"+macode+",剩余可获取镭雕条码数为:"+rs.getResultList().size()+",不足拼版数:"+combineqty+"!");
|
|
return ApiResponse.failRspResult("工单号:"+macode+",剩余可获取镭雕条码数为:"+rs.getResultList().size()+",不足拼版数:"+combineqty+"!");
|