异常代码优化提交

master
赵嘉伟 4 years ago
parent 7da87e0585
commit 2a07b6f4a9

@ -10,7 +10,6 @@ import com.foreverwin.mesnac.anomaly.service.FileUploadedService;
import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.common.dto.SfcDispatchDto;
import com.foreverwin.mesnac.common.service.SfcDispatchCommonService; import com.foreverwin.mesnac.common.service.SfcDispatchCommonService;
import com.foreverwin.mesnac.meapi.service.NcCodeService; import com.foreverwin.mesnac.meapi.service.NcCodeService;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage; import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R; import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -22,8 +21,8 @@ import java.util.List;
/** /**
* *
* @author * @author zjw
* @since 2021-07-22 * @since 2021-08-16
*/ */
@RestController @RestController
@RequestMapping("/Z-ABNORMAL-BILL") @RequestMapping("/Z-ABNORMAL-BILL")
@ -38,12 +37,9 @@ public class AbnormalBillController {
@Autowired @Autowired
private FileUploadedService fileUploadedService; private FileUploadedService fileUploadedService;
@Autowired @Autowired
private NcCodeService ncCodeService; private NcCodeService ncCodeService;
/** /**
* id * id
* *
@ -71,19 +67,6 @@ public class AbnormalBillController {
return R.ok(result); return R.ok(result);
} }
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("getQCAbnormal")
public R getQCAbnormal(){
List<AbnormalBill> result;
result = abnormalBillService.getQCAbnormal();
return R.ok(result);
}
/** /**
* *
* *
@ -95,8 +78,6 @@ public class AbnormalBillController {
public R page(FrontPage<AbnormalBill> frontPage, AbnormalBill abnormalBill){ public R page(FrontPage<AbnormalBill> frontPage, AbnormalBill abnormalBill){
IPage result; IPage result;
QueryWrapper<AbnormalBill> queryWrapper = new QueryWrapper<>(); QueryWrapper<AbnormalBill> queryWrapper = new QueryWrapper<>();
String site = CommonMethods.getSite();
abnormalBill.setSite(site);
queryWrapper.setEntity(abnormalBill); queryWrapper.setEntity(abnormalBill);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) { if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query //TODO modify global query
@ -105,6 +86,8 @@ public class AbnormalBillController {
.or().like(AbnormalBill::getSite, frontPage.getGlobalQuery()) .or().like(AbnormalBill::getSite, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getAbnormalNo, frontPage.getGlobalQuery()) .or().like(AbnormalBill::getAbnormalNo, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getStatus, frontPage.getGlobalQuery()) .or().like(AbnormalBill::getStatus, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getCorrection, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getProgram, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getType, frontPage.getGlobalQuery()) .or().like(AbnormalBill::getType, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getItemBo, frontPage.getGlobalQuery()) .or().like(AbnormalBill::getItemBo, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getSfc, frontPage.getGlobalQuery()) .or().like(AbnormalBill::getSfc, frontPage.getGlobalQuery())
@ -183,6 +166,21 @@ public class AbnormalBillController {
} }
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("getQCAbnormal")
public R getQCAbnormal(){
List<AbnormalBill> result;
result = abnormalBillService.getQCAbnormal();
return R.ok(result);
}
/** /**
* *
* @param type * @param type
@ -353,7 +351,6 @@ public class AbnormalBillController {
} }
@GetMapping("/findNcCodeDescriptionByNcCode") @GetMapping("/findNcCodeDescriptionByNcCode")
public R findNcCodeDescriptionByNcCode(String ncCode){ public R findNcCodeDescriptionByNcCode(String ncCode){
return R.ok(ncCodeService.findNcCodeDescriptionByNcCode(ncCode)); return R.ok(ncCodeService.findNcCodeDescriptionByNcCode(ncCode));

@ -169,6 +169,16 @@ public class AbnormalBillDisposeDto extends AbnormalBillDispose {
*/ */
private String reportSendUserGroup; private String reportSendUserGroup;
/**
*
*/
private String correction;
/**
*
*/
private String program;
/** /**
* *
* @return * @return
@ -438,4 +448,20 @@ public class AbnormalBillDisposeDto extends AbnormalBillDispose {
public void setReportSendUserGroup(String reportSendUserGroup) { public void setReportSendUserGroup(String reportSendUserGroup) {
this.reportSendUserGroup = reportSendUserGroup; this.reportSendUserGroup = reportSendUserGroup;
} }
public String getCorrection() {
return correction;
}
public void setCorrection(String correction) {
this.correction = correction;
}
public String getProgram() {
return program;
}
public void setProgram(String program) {
this.program = program;
}
} }

@ -14,12 +14,13 @@ import java.util.List;
* Mapper * Mapper
* </p> * </p>
* *
* @author * @author zjw
* @since 2021-07-22 * @since 2021-08-16
*/ */
@Repository @Repository
public interface AbnormalBillMapper extends BaseMapper<AbnormalBill> { public interface AbnormalBillMapper extends BaseMapper<AbnormalBill> {
List<AbnormalBillDto> backLog(@Param("abnormalBill")AbnormalBillDto abnormalBillDto, @Param("language")String language); List<AbnormalBillDto> backLog(@Param("abnormalBill")AbnormalBillDto abnormalBillDto, @Param("language")String language);
/** /**
@ -37,4 +38,6 @@ public interface AbnormalBillMapper extends BaseMapper<AbnormalBill> {
List<ScrapDto> findScrapDtoBySfc(@Param("site")String site, @Param("sfc")String sfc); List<ScrapDto> findScrapDtoBySfc(@Param("site")String site, @Param("sfc")String sfc);
List<AbnormalBill> getQCAbnormalList(@Param("site") String site); List<AbnormalBill> getQCAbnormalList(@Param("site") String site);
} }

@ -14,8 +14,8 @@ import java.time.LocalDateTime;
* *
* </p> * </p>
* *
* @author * @author zjw
* @since 2021-07-22 * @since 2021-08-16
*/ */
@TableName("Z_ABNORMAL_BILL") @TableName("Z_ABNORMAL_BILL")
@ -44,6 +44,16 @@ public class AbnormalBill extends Model<AbnormalBill> {
*/ */
@TableField("STATUS") @TableField("STATUS")
private String status; private String status;
/**
*
*/
@TableField("CORRECTION")
private String correction;
/**
*
*/
@TableField("PROGRAM")
private String program;
/** /**
* QZS * QZS
*/ */
@ -226,7 +236,6 @@ public class AbnormalBill extends Model<AbnormalBill> {
public String getHandle() { public String getHandle() {
return handle; return handle;
} }
@ -259,6 +268,22 @@ public class AbnormalBill extends Model<AbnormalBill> {
this.status = status; this.status = status;
} }
public String getCorrection() {
return correction;
}
public void setCorrection(String correction) {
this.correction = correction;
}
public String getProgram() {
return program;
}
public void setProgram(String program) {
this.program = program;
}
public String getType() { public String getType() {
return type; return type;
} }
@ -563,6 +588,10 @@ public static final String ABNORMAL_NO = "ABNORMAL_NO";
public static final String STATUS = "STATUS"; public static final String STATUS = "STATUS";
public static final String CORRECTION = "CORRECTION";
public static final String PROGRAM = "PROGRAM";
public static final String TYPE = "TYPE"; public static final String TYPE = "TYPE";
public static final String ITEM_BO = "ITEM_BO"; public static final String ITEM_BO = "ITEM_BO";
@ -644,6 +673,8 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", site = " + site + ", site = " + site +
", abnormalNo = " + abnormalNo + ", abnormalNo = " + abnormalNo +
", status = " + status + ", status = " + status +
", correction = " + correction +
", program = " + program +
", type = " + type + ", type = " + type +
", itemBo = " + itemBo + ", itemBo = " + itemBo +
", sfc = " + sfc + ", sfc = " + sfc +

@ -17,8 +17,8 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author zjw
* @since 2021-07-22 * @since 2021-08-16
*/ */
public interface AbnormalBillService extends IService<AbnormalBill> { public interface AbnormalBillService extends IService<AbnormalBill> {
@ -31,6 +31,7 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
List<AbnormalBill> selectList(AbnormalBill abnormalBill); List<AbnormalBill> selectList(AbnormalBill abnormalBill);
String anomalyReportOther(AbnormalBill abnormalBill, String anomalyReportOther(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose, AbnormalBillDispose abnormalBillDispose,
List<String> dutyCauseType, List<String> dutyCauseType,
@ -57,7 +58,7 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
/** /**
* *
*/ */
HashMap<String,Object> init( String type); HashMap<String,Object> init(String type);
/** /**
* *
* @param abnormalBillDto * @param abnormalBillDto
@ -135,4 +136,5 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
String formatMessage(AbnormalBill abnormalBill,String messageType, String site); String formatMessage(AbnormalBill abnormalBill,String messageType, String site);
List<AbnormalBill> getQCAbnormal(); List<AbnormalBill> getQCAbnormal();
} }

@ -47,8 +47,8 @@ import java.util.*;
* *
* </p> * </p>
* *
* @author * @author zjw
* @since 2021-07-22 * @since 2021-08-16
*/ */
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -85,7 +85,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
@Autowired @Autowired
private ShopOrderMapper shopOrderMapper; private ShopOrderMapper shopOrderMapper;
@Autowired @Autowired
private RouterService routerService; private RouterService routerService;
@ -132,6 +131,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
private UserService userService; private UserService userService;
@Override @Override
public IPage<AbnormalBill> selectPage(FrontPage<AbnormalBill> frontPage, AbnormalBill abnormalBill) { public IPage<AbnormalBill> selectPage(FrontPage<AbnormalBill> frontPage, AbnormalBill abnormalBill) {
QueryWrapper<AbnormalBill> queryWrapper = new QueryWrapper<>(); QueryWrapper<AbnormalBill> queryWrapper = new QueryWrapper<>();
@ -217,7 +217,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//判断是否是用户自报,如果是自报的话,调用孙豪的方法 //判断是否是用户自报,如果是自报的话,调用孙豪的方法
if(!StringUtil.isBlank(abnormalBill.getInspector()) && Constants.NEW.equals(abnormalBill.getStatus())){ if(!StringUtil.isBlank(abnormalBill.getInspector()) && Constants.NEW.equals(abnormalBill.getStatus())){
abnormalBill.setObjectBo(HandleEnum.SELF_REPORT.getHandle(abnormalBill.getSite(),abnormalBill.getObjectBo())); abnormalBill.setObjectBo(HandleEnum.SELF_REPORT.getHandle(abnormalBill.getSite(),abnormalBill.getObjectBo()));
selfReportService.updateState(abnormalBill.getObjectBo(),Constants.STATE_CONFIRM); selfReportService.updateState(abnormalBill.getObjectBo(), Constants.STATE_CONFIRM);
} }
@ -258,7 +258,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
} }
@Override @Override
public HashMap<String, Object> init( String type) { public HashMap<String, Object> init(String type) {
HashMap<String, Object> hashMap = new HashMap<>(); HashMap<String, Object> hashMap = new HashMap<>();
String site = CommonMethods.getSite(); String site = CommonMethods.getSite();
@ -360,6 +360,11 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
abnormalBillDispose.setHandle(HandleEnum.ABNORMAL_BILL_DISPOSE.getHandle(site,abnormalBill.getAbnormalNo())); abnormalBillDispose.setHandle(HandleEnum.ABNORMAL_BILL_DISPOSE.getHandle(site,abnormalBill.getAbnormalNo()));
AbnormalBill abnormalBill1 = abnormalBillMapper.selectById(HandleEnum.ABNORMAL_BILL.getHandle(site, abnormalBill.getAbnormalNo()));
if("true".equals(abnormalBill1.getProgram())){
throw BusinessException.build("该异常单已经方案确认");
}
if(!StringUtil.isBlank(abnormalBillDispose.getRouterBo())){ if(!StringUtil.isBlank(abnormalBillDispose.getRouterBo())){
//分割该工艺路线 //分割该工艺路线
String[] routerSplit = abnormalBillDispose.getRouterBo().split(","); String[] routerSplit = abnormalBillDispose.getRouterBo().split(",");
@ -393,6 +398,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalBillDispose.setResolveDateTime(now); abnormalBillDispose.setResolveDateTime(now);
abnormalBillDispose.setResolveUser(user); abnormalBillDispose.setResolveUser(user);
abnormalBill.setStatus(Constants.PROGRAM_CONFIRM); abnormalBill.setStatus(Constants.PROGRAM_CONFIRM);
abnormalBill.setCorrection("true");
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose); abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
this.saveOrUpdate(abnormalBill); this.saveOrUpdate(abnormalBill);
@ -411,10 +417,11 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//判断判责提交是否已经填写 //判断判责提交是否已经填写
//AbnormalBillDispose abnormalBillDispose1 = abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle()); //AbnormalBillDispose abnormalBillDispose1 = abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle());
AbnormalBill abnormalBill1 = abnormalBillMapper.selectById(abnormalBill.getHandle()); AbnormalBill abnormalBill1 = abnormalBillMapper.selectById(abnormalBill.getHandle());
if(!"N".equals(abnormalBill1.getStatus()) && !"X".equals(abnormalBill1.getStatus()) ){ if("true".equals(abnormalBill1.getCorrection())){
throw BusinessException.build("该异常单已经判责提交"); throw BusinessException.build("该异常单已经判责提交");
} }
abnormalBill.setStatus(Constants.CORRECTION_CONFIRM); abnormalBill.setStatus(Constants.CORRECTION_CONFIRM);
abnormalBill.setCorrection("true");
abnormalBillDispose.setDutyDateTime(now); abnormalBillDispose.setDutyDateTime(now);
abnormalBillDispose.setDutyUser(user); abnormalBillDispose.setDutyUser(user);
@ -1007,18 +1014,20 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//发送消息 //发送消息
if(!Constants.ABNORMAL_MESSAGE_RESPONSE.equals(abnormalMessage.getNode())){ // if(!Constants.ABNORMAL_MESSAGE_RESPONSE.equals(abnormalMessage.getNode())){
List<NwaUser> nwaUsers = nwaUserService.checkUserGroup(site,abnormalMessage.getSendUserGroup()); // List<NwaUser> nwaUsers = nwaUserService.checkUserGroup(site,abnormalMessage.getSendUserGroup());
StringBuilder sendUsers = new StringBuilder(); //
for (int i = 0; i < nwaUsers.size(); i++) { // StringBuilder sendUsers = new StringBuilder();
if(i == (nwaUsers.size() - 1)){ //
sendUsers.append(nwaUsers.get(i)); // for (int i = 0; i < nwaUsers.size(); i++) {
}else{ // if(i == (nwaUsers.size() - 1)){
sendUsers.append(nwaUsers.get(i)).append("|"); // sendUsers.append(nwaUsers.get(i));
} // }else{
} // sendUsers.append(nwaUsers.get(i)).append("|");
activeMQUtil.wechatSendMessage(sendUsers.toString(),abnormalMessage.getContent()); // }
} // }
// activeMQUtil.wechatSendMessage(sendUsers.toString(),abnormalMessage.getContent());
// }
messageService.saveOrUpdate(abnormalMessage); messageService.saveOrUpdate(abnormalMessage);
return true; return true;
} }
@ -1098,4 +1107,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
} }
return abnormalBillMapper.findScrapDtoBySfc(site, sfc); return abnormalBillMapper.findScrapDtoBySfc(site, sfc);
} }
} }

@ -69,6 +69,8 @@
<result column="FULL_NAME" property="fullName"/> <result column="FULL_NAME" property="fullName"/>
<result column="OPERATION" property="operation"/> <result column="OPERATION" property="operation"/>
<result column="REPORT_SEND_USER_GROUP" property="reportSendUserGroup"/> <result column="REPORT_SEND_USER_GROUP" property="reportSendUserGroup"/>
<result column="CORRECTION" property="correction"/>
<result column="PROGRAM" property="program"/>
</resultMap> </resultMap>
@ -709,7 +711,8 @@
ZABD.DUTY_SEND_USER_GROUP DUTY_SEND_USER_GROUP,ZABD.DUTY_TYPE DUTY_TYPE,ZABD.PRINCIPAL_USER PRINCIPAL_USER,ZABD.ABNORMAL_METHOD ABNORMAL_METHOD, ZABD.DUTY_SEND_USER_GROUP DUTY_SEND_USER_GROUP,ZABD.DUTY_TYPE DUTY_TYPE,ZABD.PRINCIPAL_USER PRINCIPAL_USER,ZABD.ABNORMAL_METHOD ABNORMAL_METHOD,
R.ROUTER ROUTER,ZABD.RESOLVE_SHOP_ORDER RESOLVE_SHOP_ORDER,ZABD.RESOLVE_REMARK RESOLVE_REMARK,ZABD.RESOLVE_SEND_USER_GROUP RESOLVE_SEND_USER_GROUP, R.ROUTER ROUTER,ZABD.RESOLVE_SHOP_ORDER RESOLVE_SHOP_ORDER,ZABD.RESOLVE_REMARK RESOLVE_REMARK,ZABD.RESOLVE_SEND_USER_GROUP RESOLVE_SEND_USER_GROUP,
ZABD.ABNORMAL_REASON ABNORMAL_REASON,ZABD.BEFORE_MEASURE BEFORE_MEASURE,"MAP".VALUE "MAP",listagg(ZANC.NC_CODE_GROUP || '/'||ZANC.NC_CODE || ',') within GROUP(ORDER BY zab.ABNORMAL_NO) NC_CODE, ZABD.ABNORMAL_REASON ABNORMAL_REASON,ZABD.BEFORE_MEASURE BEFORE_MEASURE,"MAP".VALUE "MAP",listagg(ZANC.NC_CODE_GROUP || '/'||ZANC.NC_CODE || ',') within GROUP(ORDER BY zab.ABNORMAL_NO) NC_CODE,
ZABD.ROUTER_BO ROUTER_BO,ZAB.OPERATION OPERATION,I.HANDLE ITEM_BO,ZAB.REPORT_SEND_USER_GROUP REPORT_SEND_USER_GROUP ZABD.ROUTER_BO ROUTER_BO,ZAB.OPERATION OPERATION,I.HANDLE ITEM_BO,ZAB.REPORT_SEND_USER_GROUP REPORT_SEND_USER_GROUP,
ZAB.CORRECTION CORRECTION,ZAB.PROGRAM PROGRAM
FROM Z_ABNORMAL_BILL ZAB FROM Z_ABNORMAL_BILL ZAB
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZAB.HANDLE = ZABD.ABNORMAL_BILL_BO LEFT JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZAB.HANDLE = ZABD.ABNORMAL_BILL_BO
INNER JOIN ITEM I ON I.HANDLE = ZAB.ITEM_BO INNER JOIN ITEM I ON I.HANDLE = ZAB.ITEM_BO
@ -746,7 +749,7 @@
ZABD.DUTY_SEND_USER_GROUP ,ZABD.DUTY_TYPE ,ZABD.PRINCIPAL_USER ,ZABD.ABNORMAL_METHOD , ZABD.DUTY_SEND_USER_GROUP ,ZABD.DUTY_TYPE ,ZABD.PRINCIPAL_USER ,ZABD.ABNORMAL_METHOD ,
R.ROUTER ,ZABD.RESOLVE_SHOP_ORDER ,ZABD.RESOLVE_REMARK ,ZABD.RESOLVE_SEND_USER_GROUP , R.ROUTER ,ZABD.RESOLVE_SHOP_ORDER ,ZABD.RESOLVE_REMARK ,ZABD.RESOLVE_SEND_USER_GROUP ,
ZABD.ABNORMAL_REASON ,ZABD.BEFORE_MEASURE ,"MAP".VALUE,ZABD.ROUTER_BO,ZAB.OPERATION,I.HANDLE, ZABD.ABNORMAL_REASON ,ZABD.BEFORE_MEASURE ,"MAP".VALUE,ZABD.ROUTER_BO,ZAB.OPERATION,I.HANDLE,
ZAB.REPORT_SEND_USER_GROUP ZAB.REPORT_SEND_USER_GROUP,ZAB.CORRECTION,ZAB.PROGRAM
</select> </select>

@ -8,6 +8,8 @@
<result column="SITE" property="site" /> <result column="SITE" property="site" />
<result column="ABNORMAL_NO" property="abnormalNo" /> <result column="ABNORMAL_NO" property="abnormalNo" />
<result column="STATUS" property="status" /> <result column="STATUS" property="status" />
<result column="CORRECTION" property="correction" />
<result column="PROGRAM" property="program" />
<result column="TYPE" property="type" /> <result column="TYPE" property="type" />
<result column="ITEM_BO" property="itemBo" /> <result column="ITEM_BO" property="itemBo" />
<result column="SFC" property="sfc" /> <result column="SFC" property="sfc" />
@ -44,6 +46,8 @@
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" /> <result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap> </resultMap>
<resultMap id="abnormalBillDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto" extends="BaseResultMap"> <resultMap id="abnormalBillDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto" extends="BaseResultMap">
<result column="SEQ" property="seq"/> <result column="SEQ" property="seq"/>
<result column="ITEM_DESCRIPTION" property="itemDescription"/> <result column="ITEM_DESCRIPTION" property="itemDescription"/>
@ -72,9 +76,10 @@
<result column="TYPE" property="type"/> <result column="TYPE" property="type"/>
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME HANDLE, SITE, ABNORMAL_NO, STATUS, CORRECTION, PROGRAM, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
</sql> </sql>
<!-- BaseMapper标准查询/修改/删除 --> <!-- BaseMapper标准查询/修改/删除 -->
@ -112,6 +117,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -160,6 +167,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -216,6 +225,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -272,6 +283,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -328,6 +341,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -384,6 +399,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -420,12 +437,12 @@
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if> <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if> </if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
AND ${ew.sqlSegment} ${ew.sqlSegment}
</if> </if>
</if> </if>
</where> </where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"> <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
AND ${ew.sqlSegment} ${ew.sqlSegment}
</if> </if>
</select> </select>
@ -440,6 +457,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -492,6 +511,8 @@
<if test="site!=null">SITE,</if> <if test="site!=null">SITE,</if>
<if test="abnormalNo!=null">ABNORMAL_NO,</if> <if test="abnormalNo!=null">ABNORMAL_NO,</if>
<if test="status!=null">STATUS,</if> <if test="status!=null">STATUS,</if>
<if test="correction!=null">CORRECTION,</if>
<if test="program!=null">PROGRAM,</if>
<if test="type!=null">TYPE,</if> <if test="type!=null">TYPE,</if>
<if test="itemBo!=null">ITEM_BO,</if> <if test="itemBo!=null">ITEM_BO,</if>
<if test="sfc!=null">SFC,</if> <if test="sfc!=null">SFC,</if>
@ -532,6 +553,8 @@
<if test="site!=null">#{site},</if> <if test="site!=null">#{site},</if>
<if test="abnormalNo!=null">#{abnormalNo},</if> <if test="abnormalNo!=null">#{abnormalNo},</if>
<if test="status!=null">#{status},</if> <if test="status!=null">#{status},</if>
<if test="correction!=null">#{correction},</if>
<if test="program!=null">#{program},</if>
<if test="type!=null">#{type},</if> <if test="type!=null">#{type},</if>
<if test="itemBo!=null">#{itemBo},</if> <if test="itemBo!=null">#{itemBo},</if>
<if test="sfc!=null">#{sfc},</if> <if test="sfc!=null">#{sfc},</if>
@ -579,6 +602,8 @@
#{site}, #{site},
#{abnormalNo}, #{abnormalNo},
#{status}, #{status},
#{correction},
#{program},
#{type}, #{type},
#{itemBo}, #{itemBo},
#{sfc}, #{sfc},
@ -622,6 +647,8 @@
<if test="et.site!=null">SITE=#{et.site},</if> <if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.abnormalNo!=null">ABNORMAL_NO=#{et.abnormalNo},</if> <if test="et.abnormalNo!=null">ABNORMAL_NO=#{et.abnormalNo},</if>
<if test="et.status!=null">STATUS=#{et.status},</if> <if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.correction!=null">CORRECTION=#{et.correction},</if>
<if test="et.program!=null">PROGRAM=#{et.program},</if>
<if test="et.type!=null">TYPE=#{et.type},</if> <if test="et.type!=null">TYPE=#{et.type},</if>
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if> <if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if> <if test="et.sfc!=null">SFC=#{et.sfc},</if>
@ -665,6 +692,8 @@
SITE=#{et.site}, SITE=#{et.site},
ABNORMAL_NO=#{et.abnormalNo}, ABNORMAL_NO=#{et.abnormalNo},
STATUS=#{et.status}, STATUS=#{et.status},
CORRECTION=#{et.correction},
PROGRAM=#{et.program},
TYPE=#{et.type}, TYPE=#{et.type},
ITEM_BO=#{et.itemBo}, ITEM_BO=#{et.itemBo},
SFC=#{et.sfc}, SFC=#{et.sfc},
@ -708,6 +737,8 @@
<if test="et.site!=null">SITE=#{et.site},</if> <if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.abnormalNo!=null">ABNORMAL_NO=#{et.abnormalNo},</if> <if test="et.abnormalNo!=null">ABNORMAL_NO=#{et.abnormalNo},</if>
<if test="et.status!=null">STATUS=#{et.status},</if> <if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.correction!=null">CORRECTION=#{et.correction},</if>
<if test="et.program!=null">PROGRAM=#{et.program},</if>
<if test="et.type!=null">TYPE=#{et.type},</if> <if test="et.type!=null">TYPE=#{et.type},</if>
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if> <if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if> <if test="et.sfc!=null">SFC=#{et.sfc},</if>
@ -750,6 +781,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -823,6 +856,8 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if> <if test="ew.entity.abnormalNo!=null"> AND ABNORMAL_NO=#{ew.entity.abnormalNo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.correction!=null"> AND CORRECTION=#{ew.entity.correction}</if>
<if test="ew.entity.program!=null"> AND PROGRAM=#{ew.entity.program}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if> <if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if> <if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
@ -1024,4 +1059,5 @@
JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO= ZAB.HANDLE JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO= ZAB.HANDLE
WHERE zab.SITE=#{site} AND zab.STATUS='G' AND zab."TYPE"='Z' AND s.QTY>1 AND (ZABD.ABNORMAL_METHOD='F' OR ZABD.ABNORMAL_METHOD='C') ORDER BY ZABD.CLOSED_DATE_TIME DESC WHERE zab.SITE=#{site} AND zab.STATUS='G' AND zab."TYPE"='Z' AND s.QTY>1 AND (ZABD.ABNORMAL_METHOD='F' OR ZABD.ABNORMAL_METHOD='C') ORDER BY ZABD.CLOSED_DATE_TIME DESC
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save