Merge remote-tracking branch 'origin/master'

master
zpl 3 years ago
commit 4027c1d517

@ -303,8 +303,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
hashMap.put("currentUser",nwaUsers.get(0).getFullName());
}
//初始化异常单号
hashMap.put("abnormalNo",this.getNextNumber(type));
if(!StringUtil.isBlank(type)){
hashMap.put("abnormalNo",this.getNextNumber(type));
}
return hashMap;
}
@ -323,7 +324,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
return null;
}
return abnormalBillDisposeMapper.findAllByAbnormalNo(abnormalBill,local);
}
@Override
@ -445,14 +445,15 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
}
abnormalBill.setStatus(Constants.SHUT_DOWN);
abnormalBillDispose.setClosedUser(user);
abnormalBillDispose.setClosedDateTime(now);
// this.anomalyCreatedAndSendMessage(abnormalBill,abnormalBillDispose);
//保存到异常计划表
AbnormalBillDisposeDto abnormalBillDisposeDto = abnormalBillDisposeMapper.findAllByAbnormalNo(abnormalBill, local);
abnormalPlanService.saveAbnormalPlan(abnormalBillDisposeDto,now);
if(Constants.ABNORMAL_QUALITY.equals(abnormalBill.getType())){
abnormalPlanService.saveAbnormalPlan(abnormalBillDisposeDto,now);
}
this.saveOrUpdate(abnormalBill);
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);

@ -21,11 +21,20 @@ import java.util.List;
*/
@Repository
public interface NcCodeMapper extends BaseMapper<NcCode> {
/**
*
* @param site
* @param locale
* @param messageType
* @param code
* @return
*/
List<NcCode> findNcByCategory(@Param("site")String site,
@Param("locale")String locale,
@Param("messageType")String messageType,
@Param("code")String code);
/*暂时不用*/
List<NcCode> findSecondaryNcByNc(@Param("site")String site,@Param("locale")String locale,@Param("ncCode")String ncCode);
IPage selectPageByNcGroup(Page<NcGroup> pagePlus,@Param("ncGroupBO") String ncGroupBO,@Param("globalQuery") String globalQuery,@Param("locale") String locale);

@ -354,20 +354,22 @@
<select id="findNcByCategory" resultMap="BaseResultMap">
SELECT NC.NC_CODE , NCT.DESCRIPTION
FROM NC_CODE NC
INNER JOIN NC_CODE_DEF NCD ON NC.HANDLE = NCD.NC_CODE_OR_GROUP_GBO AND NCD.CAN_BE_PRIMARY_CODE = 'true'
/*判断是否是主数据*/
/*INNER JOIN NC_CODE_DEF NCD ON NC.HANDLE = NCD.NC_CODE_OR_GROUP_GBO AND NCD.CAN_BE_PRIMARY_CODE = 'true'*/
INNER JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = #{locale}
LEFT JOIN NC_GROUP_MEMBER NGM ON NGM.NC_CODE_OR_GROUP_GBO = NC.HANDLE
LEFT JOIN NC_GROUP NG ON NG.HANDLE = NGM.NC_GROUP_BO
<where>
NC.SITE = #{site}
AND NCD.CAN_BE_PRIMARY_CODE = 'true'
<if test="messageType != null and messageType != ''">
AND NC.NC_CATEGORY =#{messageType}
</if>
AND NG.NC_GROUP LIKE 'E\_%' ESCAPE '\'
<if test="code != null and code != ''">
AND NC.NC_CDDE = #{code}
</if>
AND NC.STATUS_BO = 'StatusBO:' || #{site} || ',101'
</where>
</select>
<!--暂时不用-->
<select id="findSecondaryNcByNc" resultMap="BaseResultMap">
SELECT SUBSTR(nsc.NC_CODE_OR_GROUP_GBO, instr(nsc.NC_CODE_OR_GROUP_GBO,',')+1) NC_CODE,nct.DESCRIPTION
FROM NC_CODE nc
@ -409,9 +411,10 @@
INNER JOIN NC_CODE NC ON NGM.NC_CODE_OR_GROUP_GBO = NC.HANDLE
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE AND NCT.LOCALE = 'zh'
<where>
NC.STATUS_BO = 'StatusBO:' || #{ncGroup.site} || ',101'
<if test="ncGroup != null">
<if test="ncGroup.site != null and ncGroup.site != ''">
NG.SITE = #{ncGroup.site}
AND NG.SITE = #{ncGroup.site}
</if>
<if test="ncGroup.ncGroup != null and ncGroup.ncGroup != null">
AND NG.NC_GROUP = #{ncGroup.ncGroup}
@ -432,6 +435,7 @@
<foreach collection="ncCode" open="(" close=")" item="item" separator=",">
UPPER(#{item})
</foreach>
AND NC.STATUS_BO = 'StatusBO:' || #{site} || ',101'
</where>
</select>

@ -359,6 +359,7 @@
FROM NC_GROUP NG
LEFT JOIN NC_GROUP_VALID_OPER NGVO ON NG.HANDLE = NGVO.NC_GROUP_BO
<where>
NG.NC_GROUP LIKE 'QC\_%' ESCAPE '\' AND
<if test="operation != null">
<if test="operation.site != null and operation.site != ''">
NG.SITE = #{operation.site}

Loading…
Cancel
Save