Merge remote-tracking branch 'origin/master'

master
zpl 4 years ago
commit 96e807a2f4

@ -13,8 +13,8 @@ import java.util.List;
/**
*
* @author robert
* @since 2021-06-29
* @author zjw
* @since 2021-08-12
*/
@RestController
@RequestMapping("/Z-ABNORMAL-BILL-DISPOSE")
@ -80,7 +80,7 @@ public class AbnormalBillDisposeController {
.or().like(AbnormalBillDispose::getRouterBo, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getResolveShopOrder, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getResolveRemark, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getResolveSendUser, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getResolveSendUserGroup, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getClosedUser, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getAbnormalReason, frontPage.getGlobalQuery())
.or().like(AbnormalBillDispose::getBeforeMeasure, frontPage.getGlobalQuery())

@ -15,8 +15,8 @@ import java.util.List;
/**
*
* @author
* @since 2021-07-23
* @author zjw
* @since 2021-08-12
*/
@RestController
@RequestMapping("/Z-ABNORMAL-BILL-LOG")
@ -109,7 +109,7 @@ public class AbnormalBillLogController {
.or().like(AbnormalBillLog::getRouterBo, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getResolveShopOrder, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getResolveRemark, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getResolveSendUser, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getResolveSendUserGroup, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getClosedUser, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getAbnormalReason, frontPage.getGlobalQuery())
.or().like(AbnormalBillLog::getBeforeMeasure, frontPage.getGlobalQuery())
@ -165,7 +165,6 @@ public class AbnormalBillLogController {
return R.ok(abnormalBillLogService.removeByIds(ids));
}
@GetMapping("/saveAndUpdate")
public R saveAndUpdate(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,

@ -12,12 +12,13 @@ import org.springframework.stereotype.Repository;
* Mapper
* </p>
*
* @author robert
* @since 2021-06-29
* @author zjw
* @since 2021-08-12
*/
@Repository
public interface AbnormalBillDisposeMapper extends BaseMapper<AbnormalBillDispose> {
/**
*
* @param abnormalBill
@ -29,4 +30,5 @@ public interface AbnormalBillDisposeMapper extends BaseMapper<AbnormalBillDispos
}

@ -11,8 +11,8 @@ import org.springframework.stereotype.Repository;
* Mapper
* </p>
*
* @author
* @since 2021-07-23
* @author zjw
* @since 2021-08-12
*/
@Repository
public interface AbnormalBillLogMapper extends BaseMapper<AbnormalBillLog> {

@ -14,8 +14,8 @@ import java.time.LocalDateTime;
*
* </p>
*
* @author robert
* @since 2021-06-29
* @author zjw
* @since 2021-08-12
*/
@TableName("Z_ABNORMAL_BILL_DISPOSE")
@ -27,7 +27,7 @@ public class AbnormalBillDispose extends Model<AbnormalBillDispose> {
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
@ -90,7 +90,11 @@ public class AbnormalBillDispose extends Model<AbnormalBillDispose> {
@TableField("RESOLVE_DATE_TIME")
private LocalDateTime resolveDateTime;
/**
*
*
X | 线 , S | , R | , C | ,
P | , F | ,
CG ,JH ,DX
*/
@TableField("ABNORMAL_METHOD")
private String abnormalMethod;
@ -110,10 +114,10 @@ public class AbnormalBillDispose extends Model<AbnormalBillDispose> {
@TableField("RESOLVE_REMARK")
private String resolveRemark;
/**
*
*
*/
@TableField("RESOLVE_SEND_USER")
private String resolveSendUser;
@TableField("RESOLVE_SEND_USER_GROUP")
private String resolveSendUserGroup;
/**
*
*/
@ -292,12 +296,12 @@ public class AbnormalBillDispose extends Model<AbnormalBillDispose> {
this.resolveRemark = resolveRemark;
}
public String getResolveSendUser() {
return resolveSendUser;
public String getResolveSendUserGroup() {
return resolveSendUserGroup;
}
public void setResolveSendUser(String resolveSendUser) {
this.resolveSendUser = resolveSendUser;
public void setResolveSendUserGroup(String resolveSendUserGroup) {
this.resolveSendUserGroup = resolveSendUserGroup;
}
public String getClosedUser() {
@ -398,7 +402,7 @@ public static final String RESOLVE_SHOP_ORDER = "RESOLVE_SHOP_ORDER";
public static final String RESOLVE_REMARK = "RESOLVE_REMARK";
public static final String RESOLVE_SEND_USER = "RESOLVE_SEND_USER";
public static final String RESOLVE_SEND_USER_GROUP = "RESOLVE_SEND_USER_GROUP";
public static final String CLOSED_USER = "CLOSED_USER";
@ -442,7 +446,7 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", routerBo = " + routerBo +
", resolveShopOrder = " + resolveShopOrder +
", resolveRemark = " + resolveRemark +
", resolveSendUser = " + resolveSendUser +
", resolveSendUserGroup = " + resolveSendUserGroup +
", closedUser = " + closedUser +
", closedDateTime = " + closedDateTime +
", abnormalReason = " + abnormalReason +

@ -14,8 +14,8 @@ import java.time.LocalDateTime;
*
* </p>
*
* @author
* @since 2021-07-23
* @author zjw
* @since 2021-08-12
*/
@TableName("Z_ABNORMAL_BILL_LOG")
@ -260,10 +260,10 @@ public class AbnormalBillLog extends Model<AbnormalBillLog> {
@TableField("RESOLVE_REMARK")
private String resolveRemark;
/**
*
*
*/
@TableField("RESOLVE_SEND_USER")
private String resolveSendUser;
@TableField("RESOLVE_SEND_USER_GROUP")
private String resolveSendUserGroup;
/**
*
*/
@ -692,12 +692,12 @@ public class AbnormalBillLog extends Model<AbnormalBillLog> {
this.resolveRemark = resolveRemark;
}
public String getResolveSendUser() {
return resolveSendUser;
public String getResolveSendUserGroup() {
return resolveSendUserGroup;
}
public void setResolveSendUser(String resolveSendUser) {
this.resolveSendUser = resolveSendUser;
public void setResolveSendUserGroup(String resolveSendUserGroup) {
this.resolveSendUserGroup = resolveSendUserGroup;
}
public String getClosedUser() {
@ -874,7 +874,7 @@ public static final String RESOLVE_SHOP_ORDER = "RESOLVE_SHOP_ORDER";
public static final String RESOLVE_REMARK = "RESOLVE_REMARK";
public static final String RESOLVE_SEND_USER = "RESOLVE_SEND_USER";
public static final String RESOLVE_SEND_USER_GROUP = "RESOLVE_SEND_USER_GROUP";
public static final String CLOSED_USER = "CLOSED_USER";
@ -952,7 +952,7 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", routerBo = " + routerBo +
", resolveShopOrder = " + resolveShopOrder +
", resolveRemark = " + resolveRemark +
", resolveSendUser = " + resolveSendUser +
", resolveSendUserGroup = " + resolveSendUserGroup +
", closedUser = " + closedUser +
", closedDateTime = " + closedDateTime +
", abnormalReason = " + abnormalReason +

@ -12,8 +12,8 @@ import java.util.List;
*
* </p>
*
* @author robert
* @since 2021-06-29
* @author zjw
* @since 2021-08-12
*/
public interface AbnormalBillDisposeService extends IService<AbnormalBillDispose> {

@ -15,8 +15,8 @@ import java.util.List;
*
* </p>
*
* @author
* @since 2021-07-23
* @author zjw
* @since 2021-08-12
*/
public interface AbnormalBillLogService extends IService<AbnormalBillLog> {

@ -85,7 +85,7 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
*
* @param abnormalBill
*/
void programConfirm(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose);
void programConfirm(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose);
/**
*

@ -17,8 +17,8 @@ import java.util.List;
*
* </p>
*
* @author robert
* @since 2021-06-29
* @author zjw
* @since 2021-08-12
*/
@Service
@Transactional(rollbackFor = Exception.class)

@ -13,10 +13,11 @@ import com.foreverwin.mesnac.anomaly.service.*;
import com.foreverwin.mesnac.common.constant.Constants;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.mapper.NwaUserMapper;
import com.foreverwin.mesnac.meapi.mapper.ShopOrderMapper;
import com.foreverwin.mesnac.meapi.model.NwaUser;
import com.foreverwin.mesnac.meapi.model.Router;
import com.foreverwin.mesnac.meapi.model.ShopOrder;
import com.foreverwin.mesnac.meapi.service.NwaUserService;
import com.foreverwin.mesnac.meapi.service.RouterService;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
@ -34,8 +35,8 @@ import java.util.List;
*
* </p>
*
* @author
* @since 2021-07-23
* @author zjw
* @since 2021-08-12
*/
@Service
@Transactional(rollbackFor = Exception.class)
@ -45,6 +46,8 @@ public class AbnormalBillLogServiceImpl extends ServiceImpl<AbnormalBillLogMappe
@Autowired
private AbnormalBillLogMapper abnormalBillLogMapper;
@Autowired
private AbnormalNcCodeService abnormalNcCodeService;
@ -61,7 +64,8 @@ public class AbnormalBillLogServiceImpl extends ServiceImpl<AbnormalBillLogMappe
private RouterService routerService;
@Autowired
private NwaUserMapper nwaUserMapper;
private NwaUserService nwaUserService;
@Autowired
private ShopOrderMapper shopOrderMapper;
@ -69,6 +73,7 @@ public class AbnormalBillLogServiceImpl extends ServiceImpl<AbnormalBillLogMappe
@Autowired
private AbnormalPlanService abnormalPlanService;
@Override
public IPage<AbnormalBillLog> selectPage(FrontPage<AbnormalBillLog> frontPage, AbnormalBillLog abnormalBillLog) {
QueryWrapper<AbnormalBillLog> queryWrapper = new QueryWrapper<>();
@ -112,12 +117,9 @@ public class AbnormalBillLogServiceImpl extends ServiceImpl<AbnormalBillLogMappe
}
}
//发送用户
String[] split = abnormalBillDispose.getResolveSendUser().split(",");
List<String> strings = Arrays.asList(split);
int length = nwaUserMapper.checkUser(site, strings);
if(length != strings.size()){
throw BusinessException.build("发送用户填报错误");
}
String resolveSendUserGroup = abnormalBillDispose.getResolveSendUserGroup();
List<NwaUser> nwaUsers = nwaUserService.checkUserGroup(site, resolveSendUserGroup);
if(abnormalBillLogMapper.selectById(abnormalBillLog.getHandle()) == null){
@ -178,4 +180,7 @@ public class AbnormalBillLogServiceImpl extends ServiceImpl<AbnormalBillLogMappe
}
}
}

@ -377,6 +377,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
throw BusinessException.build("该返修工艺不存在");
}
}
//判断返修工单是否正确
if(!StringUtil.isBlank(abnormalBillDispose.getResolveShopOrder())){
ShopOrder shopOrder = shopOrderMapper.selectById(HandleEnum.SHOP_ORDER.getHandle(site, abnormalBillDispose.getResolveShopOrder()));
@ -384,13 +386,10 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
throw BusinessException.build("该返修工单不存在");
}
}
//发送用户
String[] split = abnormalBillDispose.getResolveSendUser().split(",");
List<String> strings = Arrays.asList(split);
int length = nwaUserMapper.checkUser(site, strings);
if(length != strings.size()){
throw BusinessException.build("发送用户填报错误");
}
nwaUserService.checkUserGroup(site,abnormalBillDispose.getResolveSendUserGroup());
//设置解决方案的处理时间和处理人
@ -925,7 +924,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalMessage.setNode(Constants.ABNORMAL_MESSAGE_CORRECTION_CONFIRM);
break;
case Constants.PROGRAM_CONFIRM://方案确认
abnormalMessage.setSendUser(abnormalBillDispose.getResolveSendUser());
abnormalMessage.setSendUser(abnormalBillDispose.getResolveSendUserGroup());
abnormalMessage.setNode(Constants.ABNORMAL_MESSAGE_PROGRAM_CONFIRM);
break;
case Constants.CANCEL://取消
@ -942,9 +941,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
messageTypeUpdateWrapper.eq("OBJECT_BO",abnormalMessage.getObjectBo());
messageService.update(abnormalMessage2,messageTypeUpdateWrapper);
break;
case Constants.SHUT_DOWN:
abnormalMessage.setSendUser(abnormalBillDispose.getResolveSendUser());
abnormalMessage.setNode(Constants.ABNORMAL_MESSAGE_PROGRAM_CONFIRM);
default:
abnormalMessage.setSendUser(abnormalBillDispose.getResolveSendUserGroup());
abnormalMessage.setNode(Constants.ABNORMAL_MESSAGE_CANCEL);
break;
}
@ -995,7 +994,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
String sendUsers = abnormalMessage.getSendUser().replace(',', '|');
activeMQUtil.wechatSendMessage(sendUsers,abnormalMessage.getContent());
}else 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++) {
if(i == (nwaUsers.size() - 1)){
@ -1060,6 +1059,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
// messageMap.put("SHOPORDER",abnormalBill.getWorkCenter());
// }
// messageMap.put("ITEM",item);
//格式化之后的消息
return StringUtils.format(body, messageMap);
}
@ -1069,7 +1069,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
return abnormalBillMapper.getQCAbnormalList(CommonMethods.getSite());
}
@Override
public boolean jgProductionIsScrap(String site,String sfc) {
//查询该sfc在质量异常异常方案是否是报废,如果是则大于1
@ -1080,16 +1079,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
@Override
public List<ScrapDto> getScrapDtoBysfc(String site, String sfc) {
//判断该产品条码是否已经报废
// if(sfcScrapMapper.selectById(HandleEnum.SFC_SCRAP.getHandle(site,sfc)) != null){
// throw new BaseException("该产品条码已经报废");
// }
if(this.jgProductionIsScrap(site,sfc)){
throw new BaseException("该产品条码的异常方案不是报废");
}
return abnormalBillMapper.findScrapDtoBySfc(site, sfc);
}
}

@ -142,7 +142,7 @@ public class AbnormalPlanServiceImpl extends ServiceImpl<AbnormalPlanMapper, Abn
AbnormalBill abnormalBill = abnormalBillMapper.selectById(HandleEnum.ABNORMAL_BILL.getHandle(site, abnormalPlan.getAbnormalNo()));
AbnormalBillDispose abnormalBillDispose = abnormalBillDisposeMapper.selectById(HandleEnum.ABNORMAL_BILL_DISPOSE.getHandle(site, abnormalPlan.getAbnormalNo()));
//发送消息
abnormalBillService.anomalyCreatedAndSendMessage(abnormalBill,abnormalBillDispose);
// abnormalBillService.anomalyCreatedAndSendMessage(abnormalBill,abnormalBillDispose);
if(Constants.PROCESSED.equals(abnormalPlan.getStatus())){
throw new BaseException("异常单:"+abnormalPlan.getAbnormalNo()+"已经处理,不能再次处理");
}

@ -4,7 +4,7 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.anomaly.model.AbnormalBillDispose">
<result column="HANDLE" property="handle" />
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="ABNORMAL_BILL_BO" property="abnormalBillBo" />
<result column="DUTY_USER" property="dutyUser" />
@ -21,7 +21,7 @@
<result column="ROUTER_BO" property="routerBo" />
<result column="RESOLVE_SHOP_ORDER" property="resolveShopOrder" />
<result column="RESOLVE_REMARK" property="resolveRemark" />
<result column="RESOLVE_SEND_USER" property="resolveSendUser" />
<result column="RESOLVE_SEND_USER_GROUP" property="resolveSendUserGroup" />
<result column="CLOSED_USER" property="closedUser" />
<result column="CLOSED_DATE_TIME" property="closedDateTime" />
<result column="ABNORMAL_REASON" property="abnormalReason" />
@ -32,6 +32,8 @@
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<!--质量异常响应界面检索用-->
<resultMap id="AbnormalBillDisposeDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDisposeDto" extends="BaseResultMap">
<result column="ABNORMAL_NO" property="abnormalNo"/>
@ -69,12 +71,17 @@
<result column="REPORT_SEND_USER_GROUP" property="reportSendUserGroup"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, ABNORMAL_BILL_BO, DUTY_USER, DUTY_DATE_TIME, DUTY_DEPART, DUTY_TYPE, PRINCIPAL_USER, DUTY_CAUSE_DESCRIPTION, DUTY_CAUSE_TYPE, DUTY_SEND_USER_GROUP, RESOLVE_USER, RESOLVE_DATE_TIME, ABNORMAL_METHOD, ROUTER_BO, RESOLVE_SHOP_ORDER, RESOLVE_REMARK, RESOLVE_SEND_USER, CLOSED_USER, CLOSED_DATE_TIME, ABNORMAL_REASON, BEFORE_MEASURE, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, ABNORMAL_BILL_BO, DUTY_USER, DUTY_DATE_TIME, DUTY_DEPART, DUTY_TYPE, PRINCIPAL_USER, DUTY_CAUSE_DESCRIPTION, DUTY_CAUSE_TYPE, DUTY_SEND_USER_GROUP, RESOLVE_USER, RESOLVE_DATE_TIME, ABNORMAL_METHOD, ROUTER_BO, RESOLVE_SHOP_ORDER, RESOLVE_REMARK, RESOLVE_SEND_USER_GROUP, CLOSED_USER, CLOSED_DATE_TIME, ABNORMAL_REASON, BEFORE_MEASURE, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_ABNORMAL_BILL_DISPOSE WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
@ -90,6 +97,12 @@
</if>
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_ABNORMAL_BILL_DISPOSE WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_ABNORMAL_BILL_DISPOSE
@ -113,7 +126,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -149,7 +162,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -193,7 +206,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -237,7 +250,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -281,7 +294,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -325,7 +338,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -369,7 +382,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -409,7 +422,7 @@
<if test="routerBo!=null">ROUTER_BO,</if>
<if test="resolveShopOrder!=null">RESOLVE_SHOP_ORDER,</if>
<if test="resolveRemark!=null">RESOLVE_REMARK,</if>
<if test="resolveSendUser!=null">RESOLVE_SEND_USER,</if>
<if test="resolveSendUserGroup!=null">RESOLVE_SEND_USER_GROUP,</if>
<if test="closedUser!=null">CLOSED_USER,</if>
<if test="closedDateTime!=null">CLOSED_DATE_TIME,</if>
<if test="abnormalReason!=null">ABNORMAL_REASON,</if>
@ -437,7 +450,7 @@
<if test="routerBo!=null">#{routerBo},</if>
<if test="resolveShopOrder!=null">#{resolveShopOrder},</if>
<if test="resolveRemark!=null">#{resolveRemark},</if>
<if test="resolveSendUser!=null">#{resolveSendUser},</if>
<if test="resolveSendUserGroup!=null">#{resolveSendUserGroup},</if>
<if test="closedUser!=null">#{closedUser},</if>
<if test="closedDateTime!=null">#{closedDateTime},</if>
<if test="abnormalReason!=null">#{abnormalReason},</if>
@ -472,7 +485,7 @@
#{routerBo},
#{resolveShopOrder},
#{resolveRemark},
#{resolveSendUser},
#{resolveSendUserGroup},
#{closedUser},
#{closedDateTime},
#{abnormalReason},
@ -485,13 +498,70 @@
</insert>
<update id="updateById">
UPDATE Z_ABNORMAL_BILL_DISPOSE <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.abnormalBillBo!=null">ABNORMAL_BILL_BO=#{et.abnormalBillBo},</if>
<if test="et.dutyUser!=null">DUTY_USER=#{et.dutyUser},</if>
<if test="et.dutyDateTime!=null">DUTY_DATE_TIME=#{et.dutyDateTime},</if>
<if test="et.dutyDepart!=null">DUTY_DEPART=#{et.dutyDepart},</if>
<if test="et.dutyType!=null">DUTY_TYPE=#{et.dutyType},</if>
<if test="et.principalUser!=null">PRINCIPAL_USER=#{et.principalUser},</if>
<if test="et.dutyCauseDescription!=null">DUTY_CAUSE_DESCRIPTION=#{et.dutyCauseDescription},</if>
<if test="et.dutyCauseType!=null">DUTY_CAUSE_TYPE=#{et.dutyCauseType},</if>
<if test="et.dutySendUserGroup!=null">DUTY_SEND_USER_GROUP=#{et.dutySendUserGroup},</if>
<if test="et.resolveUser!=null">RESOLVE_USER=#{et.resolveUser},</if>
<if test="et.resolveDateTime!=null">RESOLVE_DATE_TIME=#{et.resolveDateTime},</if>
<if test="et.abnormalMethod!=null">ABNORMAL_METHOD=#{et.abnormalMethod},</if>
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
<if test="et.resolveShopOrder!=null">RESOLVE_SHOP_ORDER=#{et.resolveShopOrder},</if>
<if test="et.resolveRemark!=null">RESOLVE_REMARK=#{et.resolveRemark},</if>
<if test="et.resolveSendUserGroup!=null">RESOLVE_SEND_USER_GROUP=#{et.resolveSendUserGroup},</if>
<if test="et.closedUser!=null">CLOSED_USER=#{et.closedUser},</if>
<if test="et.closedDateTime!=null">CLOSED_DATE_TIME=#{et.closedDateTime},</if>
<if test="et.abnormalReason!=null">ABNORMAL_REASON=#{et.abnormalReason},</if>
<if test="et.beforeMeasure!=null">BEFORE_MEASURE=#{et.beforeMeasure},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.createdDataTime!=null">CREATED_DATA_TIME=#{et.createdDataTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_ABNORMAL_BILL_DISPOSE <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
ABNORMAL_BILL_BO=#{et.abnormalBillBo},
DUTY_USER=#{et.dutyUser},
DUTY_DATE_TIME=#{et.dutyDateTime},
DUTY_DEPART=#{et.dutyDepart},
DUTY_TYPE=#{et.dutyType},
PRINCIPAL_USER=#{et.principalUser},
DUTY_CAUSE_DESCRIPTION=#{et.dutyCauseDescription},
DUTY_CAUSE_TYPE=#{et.dutyCauseType},
DUTY_SEND_USER_GROUP=#{et.dutySendUserGroup},
RESOLVE_USER=#{et.resolveUser},
RESOLVE_DATE_TIME=#{et.resolveDateTime},
ABNORMAL_METHOD=#{et.abnormalMethod},
ROUTER_BO=#{et.routerBo},
RESOLVE_SHOP_ORDER=#{et.resolveShopOrder},
RESOLVE_REMARK=#{et.resolveRemark},
RESOLVE_SEND_USER_GROUP=#{et.resolveSendUserGroup},
CLOSED_USER=#{et.closedUser},
CLOSED_DATE_TIME=#{et.closedDateTime},
ABNORMAL_REASON=#{et.abnormalReason},
BEFORE_MEASURE=#{et.beforeMeasure},
CREATED_USER=#{et.createdUser},
CREATED_DATA_TIME=#{et.createdDataTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_ABNORMAL_BILL_DISPOSE <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.abnormalBillBo!=null">ABNORMAL_BILL_BO=#{et.abnormalBillBo},</if>
<if test="et.dutyUser!=null">DUTY_USER=#{et.dutyUser},</if>
@ -508,7 +578,7 @@
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
<if test="et.resolveShopOrder!=null">RESOLVE_SHOP_ORDER=#{et.resolveShopOrder},</if>
<if test="et.resolveRemark!=null">RESOLVE_REMARK=#{et.resolveRemark},</if>
<if test="et.resolveSendUser!=null">RESOLVE_SEND_USER=#{et.resolveSendUser},</if>
<if test="et.resolveSendUserGroup!=null">RESOLVE_SEND_USER_GROUP=#{et.resolveSendUserGroup},</if>
<if test="et.closedUser!=null">CLOSED_USER=#{et.closedUser},</if>
<if test="et.closedDateTime!=null">CLOSED_DATE_TIME=#{et.closedDateTime},</if>
<if test="et.abnormalReason!=null">ABNORMAL_REASON=#{et.abnormalReason},</if>
@ -538,7 +608,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -558,6 +628,9 @@
</if>
</update>
<delete id="deleteById">
DELETE FROM Z_ABNORMAL_BILL_DISPOSE WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_ABNORMAL_BILL_DISPOSE
@ -596,7 +669,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -616,34 +689,42 @@
</if>
</delete>
<delete id="deleteBatchIds">
DELETE FROM Z_ABNORMAL_BILL_DISPOSE WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="findAllByAbnormalNo" resultMap="AbnormalBillDisposeDto">
SELECT ZAB.ABNORMAL_NO ABNORMAL_NO ,ZAB.STATUS STATUS,I.ITEM ITEM,IT.DESCRIPTION ITEM_DESCRIPTION,
ZAB."TYPE" "TYPE" ,ZAB.SFC SFC,ZAB.MESSAGE_TYPE MESSAGE_TYPE,ZAB.SHOP_ORDER SHOP_ORDER,
ZAB.WORK_CENTER WORK_CENTER,ZAB.RESRCE RESRCE, WORKORDER.VALUE WORK_ORDER,ITEMNUMBER.VALUE ITEM_NUMBER,
PRODUCTCATEGORY.VALUE PRODUCT_CATEGORY,listagg(NG.DESCRIPTION || '/'||NCT.DESCRIPTION || ',') within GROUP(ORDER BY zab.ABNORMAL_NO) NC_CODE_DESCRIPTION,
ZAB.PB_DESCRIPTION PB_DESCRIPTION ,ZAB.NC_QTY NC_QTY,
ZAB.PB_GRADE PB_GRADE ,NWA.FULL_NAME PB_USER ,ZAB.PB_QTY PB_QTY ,ZAB.DISCOVER DISCOVER ,
ZAB.INSPECTOR INSPECTOR ,ZAB.ENTITY_LOCATION ENTITY_LOCATION ,ZAB.REPORT_FROM REPORT_FROM ,SUBSTR(ZAB.OBJECT_BO,INSTR(ZAB.OBJECT_BO,',')+1) OBJECT_BO,
ZAB.PB_PHOTOSHOP PB_PHOTOSHOP,ZABD.DUTY_CAUSE_DESCRIPTION DUTY_CAUSE_DESCRIPTION,ZABD.DUTY_CAUSE_TYPE DUTY_CAUSE_TYPE,ZABD.DUTY_DEPART DUTY_DEPART,
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 RESOLVE_SEND_USER,
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,
ZAB."TYPE" "TYPE" ,ZAB.SFC SFC,ZAB.MESSAGE_TYPE MESSAGE_TYPE,ZAB.SHOP_ORDER SHOP_ORDER,
ZAB.WORK_CENTER WORK_CENTER,ZAB.RESRCE RESRCE, WORKORDER.VALUE WORK_ORDER,ITEMNUMBER.VALUE ITEM_NUMBER,
PRODUCTCATEGORY.VALUE PRODUCT_CATEGORY,listagg(NG.DESCRIPTION || '/'||NCT.DESCRIPTION || ',') within GROUP(ORDER BY zab.ABNORMAL_NO) NC_CODE_DESCRIPTION,
ZAB.PB_DESCRIPTION PB_DESCRIPTION ,ZAB.NC_QTY NC_QTY,
ZAB.PB_GRADE PB_GRADE ,NWA.FULL_NAME PB_USER ,ZAB.PB_QTY PB_QTY ,ZAB.DISCOVER DISCOVER ,
NWA2.FULL_NAME INSPECTOR ,ZAB.ENTITY_LOCATION ENTITY_LOCATION ,ZAB.REPORT_FROM REPORT_FROM ,SUBSTR(ZAB.OBJECT_BO,INSTR(ZAB.OBJECT_BO,',')+1) OBJECT_BO,
ZAB.PB_PHOTOSHOP PB_PHOTOSHOP,ZABD.DUTY_CAUSE_DESCRIPTION DUTY_CAUSE_DESCRIPTION,ZABD.DUTY_CAUSE_TYPE DUTY_CAUSE_TYPE,ZABD.DUTY_DEPART DUTY_DEPART,
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,
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
FROM Z_ABNORMAL_BILL ZAB
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZAB.HANDLE = ZABD.ABNORMAL_BILL_BO
INNER JOIN ITEM I ON I.HANDLE = ZAB.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE AND IT.LOCALE = #{locale}
INNER JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZAB.SHOP_ORDER AND SO.SITE = ZAB.SITE
LEFT JOIN CUSTOM_FIELDS WORKORDER ON WORKORDER.HANDLE = SO.HANDLE AND WORKORDER."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS ITEMNUMBER ON ITEMNUMBER.HANDLE = SO.HANDLE AND ITEMNUMBER."ATTRIBUTE" = 'ITEM_NUMBER'
LEFT JOIN CUSTOM_FIELDS PRODUCTCATEGORY ON PRODUCTCATEGORY.HANDLE = SO.HANDLE AND PRODUCTCATEGORY."ATTRIBUTE" = 'PRODUCT_CATEGORY'
LEFT JOIN CUSTOM_FIELDS "MAP" ON "MAP".HANDLE = SO.HANDLE AND "MAP"."ATTRIBUTE" = 'MAP'
LEFT JOIN Z_ABNORMAL_NC_CODE ZANC ON ZAB.HANDLE = ZANC.ABNORMAL_BILL_BO
LEFT JOIN NC_CODE_T NCT ON ('NCCodeBO:' || ZAB.SITE || ',' || ZANC.NC_CODE) = NCT.NC_CODE_BO AND NCT.LOCALE = #{locale}
LEFT JOIN Z_NWA_USER NWA ON NWA.USER_NAME = ZAB.PB_USER AND NWA.SITE = ZAB.SITE
LEFT JOIN NC_GROUP NG ON NG.NC_GROUP = ZANC.NC_CODE_GROUP AND NG.SITE = ZAB.SITE
LEFT JOIN ROUTER R ON SUBSTR(R.HANDLE,1,INSTR(R.HANDLE,',',-1)-1) = SUBSTR(ZABD.ROUTER_BO,1,INSTR(ZABD.ROUTER_BO,',',-1)-1) AND R.CURRENT_REVISION = 'true'
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZAB.HANDLE = ZABD.ABNORMAL_BILL_BO
INNER JOIN ITEM I ON I.HANDLE = ZAB.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE AND IT.LOCALE = #{locale}
INNER JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZAB.SHOP_ORDER AND SO.SITE = ZAB.SITE
LEFT JOIN CUSTOM_FIELDS WORKORDER ON WORKORDER.HANDLE = SO.HANDLE AND WORKORDER."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS ITEMNUMBER ON ITEMNUMBER.HANDLE = SO.HANDLE AND ITEMNUMBER."ATTRIBUTE" = 'ITEM_NUMBER'
LEFT JOIN CUSTOM_FIELDS PRODUCTCATEGORY ON PRODUCTCATEGORY.HANDLE = SO.HANDLE AND PRODUCTCATEGORY."ATTRIBUTE" = 'PRODUCT_CATEGORY'
LEFT JOIN CUSTOM_FIELDS "MAP" ON "MAP".HANDLE = SO.HANDLE AND "MAP"."ATTRIBUTE" = 'MAP'
LEFT JOIN Z_ABNORMAL_NC_CODE ZANC ON ZAB.HANDLE = ZANC.ABNORMAL_BILL_BO
LEFT JOIN NC_CODE_T NCT ON ('NCCodeBO:' || ZAB.SITE || ',' || ZANC.NC_CODE) = NCT.NC_CODE_BO AND NCT.LOCALE = #{locale}
LEFT JOIN Z_NWA_USER NWA ON NWA.USER_NAME = ZAB.PB_USER AND NWA.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER NWA2 ON NWA2.USER_NAME = ZAB.INSPECTOR AND NWA2.SITE = ZAB.SITE
LEFT JOIN NC_GROUP NG ON NG.NC_GROUP = ZANC.NC_CODE_GROUP AND NG.SITE = ZAB.SITE
LEFT JOIN ROUTER R ON SUBSTR(R.HANDLE,1,INSTR(R.HANDLE,',',-1)-1) = SUBSTR(ZABD.ROUTER_BO,1,INSTR(ZABD.ROUTER_BO,',',-1)-1) AND R.CURRENT_REVISION = 'true'
<where>
<if test="abnormalBill != null">
<if test="abnormalBill.site != null and abnormalBill.site != ''">
@ -655,17 +736,17 @@
</if>
</where>
GROUP BY
ZAB.ABNORMAL_NO ,ZAB.STATUS ,I.ITEM ,IT.DESCRIPTION ,
ZAB."TYPE" ,ZAB.SFC ,ZAB.MESSAGE_TYPE ,ZAB.SHOP_ORDER ,
ZAB.WORK_CENTER ,ZAB.RESRCE , WORKORDER.VALUE ,ITEMNUMBER.VALUE ,
PRODUCTCATEGORY.VALUE, ZAB.PB_DESCRIPTION ,ZAB.NC_QTY ,
ZAB.PB_GRADE ,NWA.FULL_NAME ,ZAB.PB_QTY ,ZAB.DISCOVER ,
ZAB.INSPECTOR ,ZAB.ENTITY_LOCATION ,ZAB.REPORT_FROM ,SUBSTR(ZAB.OBJECT_BO,INSTR(ZAB.OBJECT_BO,',')+1),
ZAB.PB_PHOTOSHOP ,ZABD.DUTY_CAUSE_DESCRIPTION ,ZABD.DUTY_CAUSE_TYPE ,ZABD.DUTY_DEPART ,
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 ,
ZABD.ABNORMAL_REASON ,ZABD.BEFORE_MEASURE ,"MAP".VALUE,ZABD.ROUTER_BO,ZAB.OPERATION,I.HANDLE,
ZAB.REPORT_SEND_USER_GROUP
ZAB.ABNORMAL_NO ,ZAB.STATUS ,I.ITEM ,IT.DESCRIPTION ,
ZAB."TYPE" ,ZAB.SFC ,ZAB.MESSAGE_TYPE ,ZAB.SHOP_ORDER ,
ZAB.WORK_CENTER ,ZAB.RESRCE , WORKORDER.VALUE ,ITEMNUMBER.VALUE ,
PRODUCTCATEGORY.VALUE, ZAB.PB_DESCRIPTION ,ZAB.NC_QTY ,
ZAB.PB_GRADE ,NWA.FULL_NAME ,ZAB.PB_QTY ,ZAB.DISCOVER ,
NWA2.FULL_NAME ,ZAB.ENTITY_LOCATION ,ZAB.REPORT_FROM ,SUBSTR(ZAB.OBJECT_BO,INSTR(ZAB.OBJECT_BO,',')+1),
ZAB.PB_PHOTOSHOP ,ZABD.DUTY_CAUSE_DESCRIPTION ,ZABD.DUTY_CAUSE_TYPE ,ZABD.DUTY_DEPART ,
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 ,
ZABD.ABNORMAL_REASON ,ZABD.BEFORE_MEASURE ,"MAP".VALUE,ZABD.ROUTER_BO,ZAB.OPERATION,I.HANDLE,
ZAB.REPORT_SEND_USER_GROUP
</select>

@ -51,7 +51,7 @@
<result column="ROUTER_BO" property="routerBo" />
<result column="RESOLVE_SHOP_ORDER" property="resolveShopOrder" />
<result column="RESOLVE_REMARK" property="resolveRemark" />
<result column="RESOLVE_SEND_USER" property="resolveSendUser" />
<result column="RESOLVE_SEND_USER_GROUP" property="resolveSendUserGroup" />
<result column="CLOSED_USER" property="closedUser" />
<result column="CLOSED_DATE_TIME" property="closedDateTime" />
<result column="ABNORMAL_REASON" property="abnormalReason" />
@ -66,7 +66,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, NC_CODE_GROUP, 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, DUTY_USER, DUTY_DATE_TIME, DUTY_DEPART, PRINCIPAL_USER, DUTY_CAUSE_DESCRIPTION, DUTY_CAUSE_TYPE, DUTY_TYPE, DUTY_SEND_USER_GROUP, RESOLVE_USER, RESOLVE_DATE_TIME, ABNORMAL_METHOD, ROUTER_BO, RESOLVE_SHOP_ORDER, RESOLVE_REMARK, RESOLVE_SEND_USER, CLOSED_USER, CLOSED_DATE_TIME, ABNORMAL_REASON, BEFORE_MEASURE, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, NC_CODE_GROUP, 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, DUTY_USER, DUTY_DATE_TIME, DUTY_DEPART, PRINCIPAL_USER, DUTY_CAUSE_DESCRIPTION, DUTY_CAUSE_TYPE, DUTY_TYPE, DUTY_SEND_USER_GROUP, RESOLVE_USER, RESOLVE_DATE_TIME, ABNORMAL_METHOD, ROUTER_BO, RESOLVE_SHOP_ORDER, RESOLVE_REMARK, RESOLVE_SEND_USER_GROUP, CLOSED_USER, CLOSED_DATE_TIME, ABNORMAL_REASON, BEFORE_MEASURE, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -147,7 +147,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -215,7 +215,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -291,7 +291,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -367,7 +367,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -443,7 +443,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -519,7 +519,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -595,7 +595,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -667,7 +667,7 @@
<if test="routerBo!=null">ROUTER_BO,</if>
<if test="resolveShopOrder!=null">RESOLVE_SHOP_ORDER,</if>
<if test="resolveRemark!=null">RESOLVE_REMARK,</if>
<if test="resolveSendUser!=null">RESOLVE_SEND_USER,</if>
<if test="resolveSendUserGroup!=null">RESOLVE_SEND_USER_GROUP,</if>
<if test="closedUser!=null">CLOSED_USER,</if>
<if test="closedDateTime!=null">CLOSED_DATE_TIME,</if>
<if test="abnormalReason!=null">ABNORMAL_REASON,</if>
@ -727,7 +727,7 @@
<if test="routerBo!=null">#{routerBo},</if>
<if test="resolveShopOrder!=null">#{resolveShopOrder},</if>
<if test="resolveRemark!=null">#{resolveRemark},</if>
<if test="resolveSendUser!=null">#{resolveSendUser},</if>
<if test="resolveSendUserGroup!=null">#{resolveSendUserGroup},</if>
<if test="closedUser!=null">#{closedUser},</if>
<if test="closedDateTime!=null">#{closedDateTime},</if>
<if test="abnormalReason!=null">#{abnormalReason},</if>
@ -794,7 +794,7 @@
#{routerBo},
#{resolveShopOrder},
#{resolveRemark},
#{resolveSendUser},
#{resolveSendUserGroup},
#{closedUser},
#{closedDateTime},
#{abnormalReason},
@ -857,7 +857,7 @@
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
<if test="et.resolveShopOrder!=null">RESOLVE_SHOP_ORDER=#{et.resolveShopOrder},</if>
<if test="et.resolveRemark!=null">RESOLVE_REMARK=#{et.resolveRemark},</if>
<if test="et.resolveSendUser!=null">RESOLVE_SEND_USER=#{et.resolveSendUser},</if>
<if test="et.resolveSendUserGroup!=null">RESOLVE_SEND_USER_GROUP=#{et.resolveSendUserGroup},</if>
<if test="et.closedUser!=null">CLOSED_USER=#{et.closedUser},</if>
<if test="et.closedDateTime!=null">CLOSED_DATE_TIME=#{et.closedDateTime},</if>
<if test="et.abnormalReason!=null">ABNORMAL_REASON=#{et.abnormalReason},</if>
@ -920,7 +920,7 @@
ROUTER_BO=#{et.routerBo},
RESOLVE_SHOP_ORDER=#{et.resolveShopOrder},
RESOLVE_REMARK=#{et.resolveRemark},
RESOLVE_SEND_USER=#{et.resolveSendUser},
RESOLVE_SEND_USER_GROUP=#{et.resolveSendUserGroup},
CLOSED_USER=#{et.closedUser},
CLOSED_DATE_TIME=#{et.closedDateTime},
ABNORMAL_REASON=#{et.abnormalReason},
@ -983,7 +983,7 @@
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
<if test="et.resolveShopOrder!=null">RESOLVE_SHOP_ORDER=#{et.resolveShopOrder},</if>
<if test="et.resolveRemark!=null">RESOLVE_REMARK=#{et.resolveRemark},</if>
<if test="et.resolveSendUser!=null">RESOLVE_SEND_USER=#{et.resolveSendUser},</if>
<if test="et.resolveSendUserGroup!=null">RESOLVE_SEND_USER_GROUP=#{et.resolveSendUserGroup},</if>
<if test="et.closedUser!=null">CLOSED_USER=#{et.closedUser},</if>
<if test="et.closedDateTime!=null">CLOSED_DATE_TIME=#{et.closedDateTime},</if>
<if test="et.abnormalReason!=null">ABNORMAL_REASON=#{et.abnormalReason},</if>
@ -1045,7 +1045,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -1138,7 +1138,7 @@
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.resolveShopOrder!=null"> AND RESOLVE_SHOP_ORDER=#{ew.entity.resolveShopOrder}</if>
<if test="ew.entity.resolveRemark!=null"> AND RESOLVE_REMARK=#{ew.entity.resolveRemark}</if>
<if test="ew.entity.resolveSendUser!=null"> AND RESOLVE_SEND_USER=#{ew.entity.resolveSendUser}</if>
<if test="ew.entity.resolveSendUserGroup!=null"> AND RESOLVE_SEND_USER_GROUP=#{ew.entity.resolveSendUserGroup}</if>
<if test="ew.entity.closedUser!=null"> AND CLOSED_USER=#{ew.entity.closedUser}</if>
<if test="ew.entity.closedDateTime!=null"> AND CLOSED_DATE_TIME=#{ew.entity.closedDateTime}</if>
<if test="ew.entity.abnormalReason!=null"> AND ABNORMAL_REASON=#{ew.entity.abnormalReason}</if>
@ -1167,7 +1167,6 @@
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="findAllByAbnormalNo" resultMap="BaseResultMap">
SELECT zab.HANDLE HANDLE ,zab.SITE SITE ,zab.ABNORMAL_NO ABNORMAL_NO ,zab.STATUS STATUS ,
zab."TYPE" "TYPE" ,zab.ITEM_BO ITEM_BO ,zab.SFC SFC ,zab.OPERATION OPERATION ,
@ -1182,9 +1181,9 @@
zabd.DUTY_CAUSE_TYPE DUTY_CAUSE_TYPE,zabd.DUTY_TYPE DUTY_TYPE,zabd.DUTY_SEND_USER_GROUP DUTY_SEND_USER_GROUP,
zabd.RESOLVE_USER RESOLVE_USER,zabd.RESOLVE_DATE_TIME RESOLVE_DATE_TIME,zabd.ABNORMAL_METHOD ABNORMAL_METHOD,
zabd.ROUTER_BO ROUTER_BO,zabd.RESOLVE_SHOP_ORDER RESOLVE_SHOP_ORDER,zabd.RESOLVE_REMARK RESOLVE_REMARK,
zabd.RESOLVE_SEND_USER RESOLVE_SEND_USER,zabd.CLOSED_USER CLOSED_USER,zabd.CLOSED_DATE_TIME CLOSED_DATE_TIME,
zabd.RESOLVE_SEND_USER_GROUP RESOLVE_SEND_USER_GROUP,zabd.CLOSED_USER CLOSED_USER,zabd.CLOSED_DATE_TIME CLOSED_DATE_TIME,
zabd.ABNORMAL_REASON ABNORMAL_REASON,zabd.BEFORE_MEASURE BEFORE_MEASURE,zab.REPORT_SEND_USER_GROUP REPORT_SEND_USER_GROUP,
zab.CANCEL_SEND_USER_GROUP CANCEL_SEND_USER_GROUP
zab.CANCEL_SEND_USER_GROUP CANCEL_SEND_USER_GROUP
FROM Z_ABNORMAL_BILL zab
INNER JOIN Z_ABNORMAL_BILL_DISPOSE zabd ON zab.HANDLE = zabd.ABNORMAL_BILL_BO
<where>
@ -1199,5 +1198,4 @@
</where>
</select>
</mapper>

@ -987,7 +987,7 @@
SELECT S.SFC SFC,
S2.STATUS STATUS,
SUBSTR(SS.OPERATION_BO ,INSTR(SS.OPERATION_BO ,',',1)+1,(INSTR(SS.OPERATION_BO ,'#',1)-1)-(INSTR(SS.OPERATION_BO ,',',1)+1)) || '/' || SS.STEP_ID OPERATION,
ZSD.RESRCE RESRCE,ZSD.SHOP_ORDER SHOP_ORDER,
ZSD2.RESRCE RESRCE,ZSD.SHOP_ORDER SHOP_ORDER,
CASE WHEN I.ITEM != 'NULL' THEN I.ITEM || '/' || I.REVISION END ITEM,
CASE WHEN R.ROUTER != 'NULL' THEN R.ROUTER || '/' || R.REVISION END ROUTER ,
CASE WHEN B.BOM != 'NULL' THEN B.BOM || '/' || B.REVISION END BOM,
@ -1001,6 +1001,8 @@
INNER JOIN SFC_STEP SS ON SS.SFC_ROUTER_BO = ST.HANDLE AND (SS.QTY_IN_QUEUE > 0 OR SS.QTY_IN_WORK > 0)
INNER JOIN STATUS S2 ON S2.HANDLE = S.STATUS_BO
INNER JOIN Z_SFC_DISPATCH ZSD ON ZSD.DISPATCH_NO = S.SFC || '-' || SS.STEP_ID
LEFT JOIN Z_SFC_DISPATCH ZSD2 ON ZSD2.DISPATCH_NO = S.SFC || '-' || SS.STEP_ID
AND ZSD2.DISPATCH_STATUS IN ('START','COMPLETE')
LEFT JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZSD.SHOP_ORDER AND SO.SITE = S.SITE
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
LEFT JOIN ROUTER R ON R.HANDLE = ZSD.ROUTER_BO

@ -20,7 +20,7 @@ import java.util.Map;
@Repository
public interface ProdReadyTaskMapper extends BaseMapper<ProdReadyTask> {
List<ProdReadyTask> getTaskList(@Param("entity")ProdReadyTask prodReadyTask, @Param("locale") String locale);
List<ProdReadyTask> getTaskList(@Param("entity")ProdReadyTask prodReadyTask, @Param("locale") String locale,@Param("admin") Integer admin,@Param("user") String user);
ProdReadyTask loadProExecute(@Param("site")String site, @Param("taskBo")String taskBo, @Param("locale") String language);

@ -23,6 +23,8 @@ import com.foreverwin.mesnac.common.util.ActiveMQUtil;
import com.foreverwin.mesnac.common.util.DateUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.dto.BomComponentDto;
import com.foreverwin.mesnac.meapi.dto.RouterStepDto;
import com.foreverwin.mesnac.meapi.mapper.UserGroupMapper;
import com.foreverwin.mesnac.meapi.mapper.WorkCenterMapper;
import com.foreverwin.mesnac.meapi.model.*;
import com.foreverwin.mesnac.meapi.service.*;
@ -76,12 +78,18 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
@Autowired
private ResrceService resrceService;
@Autowired
private RouterService routerService;
@Autowired
private RouterStepService routerStepService;
@Autowired
private ProdReadyTaskDetailService prodReadyTaskDetailService;
@Autowired
private SfcDispatchCommonService sfcDispatchCommonService;
@Autowired
private BomComponentService bomComponentService;
@Autowired
private UserGroupMapper userGroupMapper;
@Autowired
private WorkCenterMapper workCenterMapper;
@Autowired
private CustomFieldsService customFieldsService;
@ -254,7 +262,10 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
@Override
public List<ProdReadyTask> getTaskList(ProdReadyTask prodReadyTask) {
return prodReadyTaskMapper.getTaskList(prodReadyTask, LocaleContextHolder.getLocale().getLanguage());
String user = CommonMethods.getUser();
String site = CommonMethods.getSite();
Integer admin = userGroupMapper.getUserGroupByUser(HandleEnum.USER.getHandle(site, user), new UserGroupBOHandle(site, "ADMINISTRATORS").getValue());
return prodReadyTaskMapper.getTaskList(prodReadyTask, LocaleContextHolder.getLocale().getLanguage(),admin,user);
}
@Override
@ -380,7 +391,21 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
String workOrder = customFieldsService.getCustomFieldsValue(sfcServiceById.getShopOrderBo(), "WORK_ORDER");
labelPrintDto.setWorkOrder(workOrder);
labelPrintDto.setBlankingSize(sfcDispatchDto.getBlankingSize());
labelPrintDto.setOperation(sfcDispatchDto.getOperation());
//下道工序
Router router = routerService.getRouterBySfcBo(HandleEnum.SFC.getHandle(site, sfcServiceById.getSfc()));
int seq = 0;
List<RouterStepDto> stepOperationList = routerStepService.findRouterOperationByRouterBo(site, router.getHandle());
for (int i = 0; i < stepOperationList.size(); i++) {
RouterStepDto stepOperation = stepOperationList.get(i);
if (stepOperation.getStepId().equals(prodReadyTask.getStepId())) {
seq = i;
}
}
if (seq != stepOperationList.size()-1) {
RouterStepDto stepOperation = stepOperationList.get(seq + 1);
labelPrintDto.setOperation(stepOperation.getOperationDesc());
}
labelPrintDtoList.add(labelPrintDto);
printData = JSON.toJSONString(labelPrintDtoList);
//打印记录

@ -637,6 +637,7 @@
LEFT JOIN ITEM_T ITT ON ITT.ITEM_BO = I.HANDLE AND ITT.LOCALE =#{locale}
JOIN RESRCE RES ON RES.RESRCE = zprt.RESRCE AND RES.SITE = zprt.SITE
WHERE ZPRT.SITE=#{entity.site}
<if test="admin == 0"> AND ZSD.EMPLOYEE LIKE '%${user}%' </if>
<if test="entity.workCenter!=null and entity.workCenter!='' "> AND ZPRT.WORK_CENTER=#{entity.workCenter}</if>
<if test="entity.resrce!=null and entity.resrce!='' "> AND ZPRT.RESRCE=#{entity.resrce}</if>
<if test="entity.dispatchNo!=null and entity.dispatchNo!='' "> AND ZSD.DISPATCH_NO=#{entity.dispatchNo}</if>

@ -1,24 +1,24 @@
package com.foreverwin.mesnac.dispatch.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.common.erp.ZprodordconfStruIn;
import com.foreverwin.mesnac.common.erp.ZprodordconfStruOut;
import com.foreverwin.mesnac.common.erp.holders.TableOfZprodordconfStruInHolder;
import com.foreverwin.mesnac.common.erp.holders.TableOfZprodordconfStruOutHolder;
import com.foreverwin.mesnac.common.util.ERPAPI;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.mesnac.dispatch.model.ItemBatch;
import com.foreverwin.mesnac.dispatch.service.ItemBatchService;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.dispatch.service.ItemBatchService;
import com.foreverwin.mesnac.dispatch.model.ItemBatch;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.List;
/**
*
@ -32,6 +32,14 @@ public class ItemBatchController {
@Autowired
public ItemBatchService itemBatchService;
@ResponseBody
@GetMapping("/getItemBatch")
public R getItemBatch(ItemBatch itemBatch){
QueryWrapper<ItemBatch> queryWrapper=new QueryWrapper<>();
itemBatch.setSite(CommonMethods.getSite());
queryWrapper.setEntity(itemBatch);
return R.ok(itemBatchService.list(queryWrapper));
}
/**
*
*

@ -1,7 +1,6 @@
package com.foreverwin.mesnac.integration.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.foreverwin.mesnac.common.constant.Constants;
import com.foreverwin.mesnac.common.constant.CustomFieldConstant;
import com.foreverwin.mesnac.common.dto.LabelPrintDto;
@ -22,6 +21,7 @@ import com.sap.me.common.MaterialType;
import com.sap.me.common.ObjectReference;
import com.sap.me.common.ProcurementType;
import com.sap.me.demand.*;
import com.sap.me.productdefinition.RouterStep;
import com.sap.me.productdefinition.*;
import com.sap.me.production.ChangeProductionServiceInterface;
import com.visiprise.globalization.DateGlobalizationServiceInterface;

@ -0,0 +1,135 @@
package com.foreverwin.mesnac.meapi.controller;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.meapi.service.RouterStepService;
import com.foreverwin.mesnac.meapi.model.RouterStep;
import java.util.List;
/**
*
* @author Philip
* @since 2021-08-12
*/
@RestController
@RequestMapping("/ROUTER-STEP")
public class RouterStepController {
@Autowired
public RouterStepService routerStepService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getRouterStepById(@PathVariable String id) {
return R.ok( routerStepService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getRouterStepList(RouterStep routerStep){
List<RouterStep> result;
QueryWrapper<RouterStep> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(routerStep);
result = routerStepService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<RouterStep> frontPage, RouterStep routerStep){
IPage result;
QueryWrapper<RouterStep> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(routerStep);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(RouterStep::getHandle, frontPage.getGlobalQuery())
.or().like(RouterStep::getRouterBo, frontPage.getGlobalQuery())
.or().like(RouterStep::getStepId, frontPage.getGlobalQuery())
.or().like(RouterStep::getDescription, frontPage.getGlobalQuery())
.or().like(RouterStep::getRework, frontPage.getGlobalQuery())
.or().like(RouterStep::getQueueDecisionType, frontPage.getGlobalQuery())
.or().like(RouterStep::getRouterCompGbo, frontPage.getGlobalQuery())
.or().like(RouterStep::getReportingStep, frontPage.getGlobalQuery())
.or().like(RouterStep::getReportingCenterBo, frontPage.getGlobalQuery())
.or().like(RouterStep::getTabularStepType, frontPage.getGlobalQuery())
.or().like(RouterStep::getScrapReportingStep, frontPage.getGlobalQuery())
.or().like(RouterStep::getIsLastReportingStep, frontPage.getGlobalQuery())
.or().like(RouterStep::getErpSequence, frontPage.getGlobalQuery())
.or().like(RouterStep::getErpControlKeyBo, frontPage.getGlobalQuery())
.or().like(RouterStep::getErpWorkCenterBo, frontPage.getGlobalQuery())
.or().like(RouterStep::getErpInspectionComplete, frontPage.getGlobalQuery())
.or().like(RouterStep::getErpOperation, frontPage.getGlobalQuery())
.or().like(RouterStep::getOperationActivityId, frontPage.getGlobalQuery())
);
}
result = routerStepService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param routerStep
* @return null
*/
@PostMapping
public R save(@RequestBody RouterStep routerStep) {
return R.ok(routerStepService.save(routerStep));
}
/**
*
* @param routerStep
* @return null
*/
@PutMapping
public R updateById(@RequestBody RouterStep routerStep) {
return R.ok(routerStepService.updateById(routerStep));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(routerStepService.removeById(id));
}
/**
*
* @param ids ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
public R removeByIds(List<String> ids){
return R.ok(routerStepService.removeByIds(ids));
}
}

@ -0,0 +1,33 @@
package com.foreverwin.mesnac.meapi.dto;
import com.foreverwin.mesnac.meapi.model.RouterStep;
public class RouterStepDto extends RouterStep {
private String operation;
private String operationBo;
private String operationDesc;
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation;
}
public String getOperationBo() {
return operationBo;
}
public void setOperationBo(String operationBo) {
this.operationBo = operationBo;
}
public String getOperationDesc() {
return operationDesc;
}
public void setOperationDesc(String operationDesc) {
this.operationDesc = operationDesc;
}
}

@ -0,0 +1,23 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.meapi.dto.RouterStepDto;
import com.foreverwin.mesnac.meapi.model.RouterStep;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author Philip
* @since 2021-08-12
*/
@Repository
public interface RouterStepMapper extends BaseMapper<RouterStep> {
List<RouterStepDto> findRouterOperationByRouterBo(@Param("site") String site, @Param("routerBo") String routerBO, @Param("locale")String locale);
}

@ -26,4 +26,5 @@ public interface UserGroupMapper extends BaseMapper<UserGroup> {
UserGroup getCustomFieldByGroup(@Param("site")String site,
@Param("userGroup")String userGroup);
Integer getUserGroupByUser(@Param("userBO")String userBO,@Param("userGroupBO")String userGroupBO);
}

@ -0,0 +1,284 @@
package com.foreverwin.mesnac.meapi.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author Philip
* @since 2021-08-12
*/
@TableName("ROUTER_STEP")
public class RouterStep extends Model<RouterStep> {
private static final long serialVersionUID = 1L;
@TableField("HANDLE")
private String handle;
@TableField("ROUTER_BO")
private String routerBo;
@TableField("STEP_ID")
private String stepId;
@TableField("DESCRIPTION")
private String description;
@TableField("REWORK")
private String rework;
@TableField("QUEUE_DECISION_TYPE")
private String queueDecisionType;
@TableField("ROUTER_COMP_GBO")
private String routerCompGbo;
@TableField("REPORTING_STEP")
private String reportingStep;
@TableField("SEQUENCE")
private Long sequence;
@TableField("REPORTING_CENTER_BO")
private String reportingCenterBo;
@TableField("TABULAR_STEP_TYPE")
private String tabularStepType;
@TableField("SCRAP_REPORTING_STEP")
private String scrapReportingStep;
@TableField("IS_LAST_REPORTING_STEP")
private String isLastReportingStep;
@TableField("ERP_SEQUENCE")
private String erpSequence;
@TableField("ERP_CONTROL_KEY_BO")
private String erpControlKeyBo;
@TableField("ERP_WORK_CENTER_BO")
private String erpWorkCenterBo;
@TableField("ERP_INSPECTION_COMPLETE")
private String erpInspectionComplete;
@TableField("ERP_OPERATION")
private String erpOperation;
@TableField("OPERATION_ACTIVITY_ID")
private String operationActivityId;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getRouterBo() {
return routerBo;
}
public void setRouterBo(String routerBo) {
this.routerBo = routerBo;
}
public String getStepId() {
return stepId;
}
public void setStepId(String stepId) {
this.stepId = stepId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getRework() {
return rework;
}
public void setRework(String rework) {
this.rework = rework;
}
public String getQueueDecisionType() {
return queueDecisionType;
}
public void setQueueDecisionType(String queueDecisionType) {
this.queueDecisionType = queueDecisionType;
}
public String getRouterCompGbo() {
return routerCompGbo;
}
public void setRouterCompGbo(String routerCompGbo) {
this.routerCompGbo = routerCompGbo;
}
public String getReportingStep() {
return reportingStep;
}
public void setReportingStep(String reportingStep) {
this.reportingStep = reportingStep;
}
public Long getSequence() {
return sequence;
}
public void setSequence(Long sequence) {
this.sequence = sequence;
}
public String getReportingCenterBo() {
return reportingCenterBo;
}
public void setReportingCenterBo(String reportingCenterBo) {
this.reportingCenterBo = reportingCenterBo;
}
public String getTabularStepType() {
return tabularStepType;
}
public void setTabularStepType(String tabularStepType) {
this.tabularStepType = tabularStepType;
}
public String getScrapReportingStep() {
return scrapReportingStep;
}
public void setScrapReportingStep(String scrapReportingStep) {
this.scrapReportingStep = scrapReportingStep;
}
public String getIsLastReportingStep() {
return isLastReportingStep;
}
public void setIsLastReportingStep(String isLastReportingStep) {
this.isLastReportingStep = isLastReportingStep;
}
public String getErpSequence() {
return erpSequence;
}
public void setErpSequence(String erpSequence) {
this.erpSequence = erpSequence;
}
public String getErpControlKeyBo() {
return erpControlKeyBo;
}
public void setErpControlKeyBo(String erpControlKeyBo) {
this.erpControlKeyBo = erpControlKeyBo;
}
public String getErpWorkCenterBo() {
return erpWorkCenterBo;
}
public void setErpWorkCenterBo(String erpWorkCenterBo) {
this.erpWorkCenterBo = erpWorkCenterBo;
}
public String getErpInspectionComplete() {
return erpInspectionComplete;
}
public void setErpInspectionComplete(String erpInspectionComplete) {
this.erpInspectionComplete = erpInspectionComplete;
}
public String getErpOperation() {
return erpOperation;
}
public void setErpOperation(String erpOperation) {
this.erpOperation = erpOperation;
}
public String getOperationActivityId() {
return operationActivityId;
}
public void setOperationActivityId(String operationActivityId) {
this.operationActivityId = operationActivityId;
}
public static final String HANDLE = "HANDLE";
public static final String ROUTER_BO = "ROUTER_BO";
public static final String STEP_ID = "STEP_ID";
public static final String DESCRIPTION = "DESCRIPTION";
public static final String REWORK = "REWORK";
public static final String QUEUE_DECISION_TYPE = "QUEUE_DECISION_TYPE";
public static final String ROUTER_COMP_GBO = "ROUTER_COMP_GBO";
public static final String REPORTING_STEP = "REPORTING_STEP";
public static final String SEQUENCE = "SEQUENCE";
public static final String REPORTING_CENTER_BO = "REPORTING_CENTER_BO";
public static final String TABULAR_STEP_TYPE = "TABULAR_STEP_TYPE";
public static final String SCRAP_REPORTING_STEP = "SCRAP_REPORTING_STEP";
public static final String IS_LAST_REPORTING_STEP = "IS_LAST_REPORTING_STEP";
public static final String ERP_SEQUENCE = "ERP_SEQUENCE";
public static final String ERP_CONTROL_KEY_BO = "ERP_CONTROL_KEY_BO";
public static final String ERP_WORK_CENTER_BO = "ERP_WORK_CENTER_BO";
public static final String ERP_INSPECTION_COMPLETE = "ERP_INSPECTION_COMPLETE";
public static final String ERP_OPERATION = "ERP_OPERATION";
public static final String OPERATION_ACTIVITY_ID = "OPERATION_ACTIVITY_ID";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "RouterStep{" +
"handle = " + handle +
", routerBo = " + routerBo +
", stepId = " + stepId +
", description = " + description +
", rework = " + rework +
", queueDecisionType = " + queueDecisionType +
", routerCompGbo = " + routerCompGbo +
", reportingStep = " + reportingStep +
", sequence = " + sequence +
", reportingCenterBo = " + reportingCenterBo +
", tabularStepType = " + tabularStepType +
", scrapReportingStep = " + scrapReportingStep +
", isLastReportingStep = " + isLastReportingStep +
", erpSequence = " + erpSequence +
", erpControlKeyBo = " + erpControlKeyBo +
", erpWorkCenterBo = " + erpWorkCenterBo +
", erpInspectionComplete = " + erpInspectionComplete +
", erpOperation = " + erpOperation +
", operationActivityId = " + operationActivityId +
"}";
}
}

@ -0,0 +1,31 @@
package com.foreverwin.mesnac.meapi.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.meapi.dto.RouterStepDto;
import com.foreverwin.mesnac.meapi.model.RouterStep;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Philip
* @since 2021-08-12
*/
public interface RouterStepService extends IService<RouterStep> {
/**
*
* @param frontPage
* @return
*/
IPage<RouterStep> selectPage(FrontPage<RouterStep> frontPage, RouterStep routerStep);
List<RouterStep> selectList(RouterStep routerStep);
List<RouterStepDto> findRouterOperationByRouterBo(String site, String handle);
}

@ -25,4 +25,6 @@ public interface UserGroupService extends IService<UserGroup> {
IPage<UserGroup> selectPage(FrontPage<UserGroup> frontPage, UserGroup userGroup);
List<UserGroup> selectList(UserGroup userGroup);
Integer getUserGroupByUser(String userBO,String userGroupBO);
}

@ -0,0 +1,53 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.meapi.dto.RouterStepDto;
import com.foreverwin.mesnac.meapi.mapper.RouterStepMapper;
import com.foreverwin.mesnac.meapi.model.RouterStep;
import com.foreverwin.mesnac.meapi.service.RouterStepService;
import com.foreverwin.modular.core.util.FrontPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Philip
* @since 2021-08-12
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class RouterStepServiceImpl extends ServiceImpl<RouterStepMapper, RouterStep> implements RouterStepService {
@Autowired
private RouterStepMapper routerStepMapper;
@Override
public IPage<RouterStep> selectPage(FrontPage<RouterStep> frontPage, RouterStep routerStep) {
QueryWrapper<RouterStep> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(routerStep);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<RouterStep> selectList(RouterStep routerStep) {
QueryWrapper<RouterStep> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(routerStep);
return super.list(queryWrapper);
}
@Override
public List<RouterStepDto> findRouterOperationByRouterBo(String site, String routerBO) {
return routerStepMapper.findRouterOperationByRouterBo( site, routerBO, LocaleContextHolder.getLocale().getLanguage());
}
}

@ -12,9 +12,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author robert
@ -42,5 +43,9 @@ public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper, UserGroup
return super.list(queryWrapper);
}
@Override
public Integer getUserGroupByUser(String userBO, String userGroupBO) {
return userGroupMapper.getUserGroupByUser(userBO,userGroupBO);
}
}

@ -0,0 +1,504 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.meapi.mapper.RouterStepMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.RouterStep">
<result column="HANDLE" property="handle" />
<result column="ROUTER_BO" property="routerBo" />
<result column="STEP_ID" property="stepId" />
<result column="DESCRIPTION" property="description" />
<result column="REWORK" property="rework" />
<result column="QUEUE_DECISION_TYPE" property="queueDecisionType" />
<result column="ROUTER_COMP_GBO" property="routerCompGbo" />
<result column="REPORTING_STEP" property="reportingStep" />
<result column="SEQUENCE" property="sequence" />
<result column="REPORTING_CENTER_BO" property="reportingCenterBo" />
<result column="TABULAR_STEP_TYPE" property="tabularStepType" />
<result column="SCRAP_REPORTING_STEP" property="scrapReportingStep" />
<result column="IS_LAST_REPORTING_STEP" property="isLastReportingStep" />
<result column="ERP_SEQUENCE" property="erpSequence" />
<result column="ERP_CONTROL_KEY_BO" property="erpControlKeyBo" />
<result column="ERP_WORK_CENTER_BO" property="erpWorkCenterBo" />
<result column="ERP_INSPECTION_COMPLETE" property="erpInspectionComplete" />
<result column="ERP_OPERATION" property="erpOperation" />
<result column="OPERATION_ACTIVITY_ID" property="operationActivityId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, ROUTER_BO, STEP_ID, DESCRIPTION, REWORK, QUEUE_DECISION_TYPE, ROUTER_COMP_GBO, REPORTING_STEP, SEQUENCE, REPORTING_CENTER_BO, TABULAR_STEP_TYPE, SCRAP_REPORTING_STEP, IS_LAST_REPORTING_STEP, ERP_SEQUENCE, ERP_CONTROL_KEY_BO, ERP_WORK_CENTER_BO, ERP_INSPECTION_COMPLETE, ERP_OPERATION, OPERATION_ACTIVITY_ID
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM ROUTER_STEP
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM ROUTER_STEP
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.RouterStep">
INSERT INTO ROUTER_STEP
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="routerBo!=null">ROUTER_BO,</if>
<if test="stepId!=null">STEP_ID,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="rework!=null">REWORK,</if>
<if test="queueDecisionType!=null">QUEUE_DECISION_TYPE,</if>
<if test="routerCompGbo!=null">ROUTER_COMP_GBO,</if>
<if test="reportingStep!=null">REPORTING_STEP,</if>
<if test="sequence!=null">SEQUENCE,</if>
<if test="reportingCenterBo!=null">REPORTING_CENTER_BO,</if>
<if test="tabularStepType!=null">TABULAR_STEP_TYPE,</if>
<if test="scrapReportingStep!=null">SCRAP_REPORTING_STEP,</if>
<if test="isLastReportingStep!=null">IS_LAST_REPORTING_STEP,</if>
<if test="erpSequence!=null">ERP_SEQUENCE,</if>
<if test="erpControlKeyBo!=null">ERP_CONTROL_KEY_BO,</if>
<if test="erpWorkCenterBo!=null">ERP_WORK_CENTER_BO,</if>
<if test="erpInspectionComplete!=null">ERP_INSPECTION_COMPLETE,</if>
<if test="erpOperation!=null">ERP_OPERATION,</if>
<if test="operationActivityId!=null">OPERATION_ACTIVITY_ID,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="routerBo!=null">#{routerBo},</if>
<if test="stepId!=null">#{stepId},</if>
<if test="description!=null">#{description},</if>
<if test="rework!=null">#{rework},</if>
<if test="queueDecisionType!=null">#{queueDecisionType},</if>
<if test="routerCompGbo!=null">#{routerCompGbo},</if>
<if test="reportingStep!=null">#{reportingStep},</if>
<if test="sequence!=null">#{sequence},</if>
<if test="reportingCenterBo!=null">#{reportingCenterBo},</if>
<if test="tabularStepType!=null">#{tabularStepType},</if>
<if test="scrapReportingStep!=null">#{scrapReportingStep},</if>
<if test="isLastReportingStep!=null">#{isLastReportingStep},</if>
<if test="erpSequence!=null">#{erpSequence},</if>
<if test="erpControlKeyBo!=null">#{erpControlKeyBo},</if>
<if test="erpWorkCenterBo!=null">#{erpWorkCenterBo},</if>
<if test="erpInspectionComplete!=null">#{erpInspectionComplete},</if>
<if test="erpOperation!=null">#{erpOperation},</if>
<if test="operationActivityId!=null">#{operationActivityId},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.RouterStep">
INSERT INTO ROUTER_STEP
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{routerBo},
#{stepId},
#{description},
#{rework},
#{queueDecisionType},
#{routerCompGbo},
#{reportingStep},
#{sequence},
#{reportingCenterBo},
#{tabularStepType},
#{scrapReportingStep},
#{isLastReportingStep},
#{erpSequence},
#{erpControlKeyBo},
#{erpWorkCenterBo},
#{erpInspectionComplete},
#{erpOperation},
#{operationActivityId},
</trim>
</insert>
<update id="update">
UPDATE ROUTER_STEP <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.rework!=null">REWORK=#{et.rework},</if>
<if test="et.queueDecisionType!=null">QUEUE_DECISION_TYPE=#{et.queueDecisionType},</if>
<if test="et.routerCompGbo!=null">ROUTER_COMP_GBO=#{et.routerCompGbo},</if>
<if test="et.reportingStep!=null">REPORTING_STEP=#{et.reportingStep},</if>
<if test="et.sequence!=null">SEQUENCE=#{et.sequence},</if>
<if test="et.reportingCenterBo!=null">REPORTING_CENTER_BO=#{et.reportingCenterBo},</if>
<if test="et.tabularStepType!=null">TABULAR_STEP_TYPE=#{et.tabularStepType},</if>
<if test="et.scrapReportingStep!=null">SCRAP_REPORTING_STEP=#{et.scrapReportingStep},</if>
<if test="et.isLastReportingStep!=null">IS_LAST_REPORTING_STEP=#{et.isLastReportingStep},</if>
<if test="et.erpSequence!=null">ERP_SEQUENCE=#{et.erpSequence},</if>
<if test="et.erpControlKeyBo!=null">ERP_CONTROL_KEY_BO=#{et.erpControlKeyBo},</if>
<if test="et.erpWorkCenterBo!=null">ERP_WORK_CENTER_BO=#{et.erpWorkCenterBo},</if>
<if test="et.erpInspectionComplete!=null">ERP_INSPECTION_COMPLETE=#{et.erpInspectionComplete},</if>
<if test="et.erpOperation!=null">ERP_OPERATION=#{et.erpOperation},</if>
<if test="et.operationActivityId!=null">OPERATION_ACTIVITY_ID=#{et.operationActivityId},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteByMap">
DELETE FROM ROUTER_STEP
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM ROUTER_STEP
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.rework!=null"> AND REWORK=#{ew.entity.rework}</if>
<if test="ew.entity.queueDecisionType!=null"> AND QUEUE_DECISION_TYPE=#{ew.entity.queueDecisionType}</if>
<if test="ew.entity.routerCompGbo!=null"> AND ROUTER_COMP_GBO=#{ew.entity.routerCompGbo}</if>
<if test="ew.entity.reportingStep!=null"> AND REPORTING_STEP=#{ew.entity.reportingStep}</if>
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<if test="ew.entity.reportingCenterBo!=null"> AND REPORTING_CENTER_BO=#{ew.entity.reportingCenterBo}</if>
<if test="ew.entity.tabularStepType!=null"> AND TABULAR_STEP_TYPE=#{ew.entity.tabularStepType}</if>
<if test="ew.entity.scrapReportingStep!=null"> AND SCRAP_REPORTING_STEP=#{ew.entity.scrapReportingStep}</if>
<if test="ew.entity.isLastReportingStep!=null"> AND IS_LAST_REPORTING_STEP=#{ew.entity.isLastReportingStep}</if>
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
<if test="ew.entity.erpControlKeyBo!=null"> AND ERP_CONTROL_KEY_BO=#{ew.entity.erpControlKeyBo}</if>
<if test="ew.entity.erpWorkCenterBo!=null"> AND ERP_WORK_CENTER_BO=#{ew.entity.erpWorkCenterBo}</if>
<if test="ew.entity.erpInspectionComplete!=null"> AND ERP_INSPECTION_COMPLETE=#{ew.entity.erpInspectionComplete}</if>
<if test="ew.entity.erpOperation!=null"> AND ERP_OPERATION=#{ew.entity.erpOperation}</if>
<if test="ew.entity.operationActivityId!=null"> AND OPERATION_ACTIVITY_ID=#{ew.entity.operationActivityId}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="findRouterOperationByRouterBo" resultType="com.foreverwin.mesnac.meapi.dto.RouterStepDto">
SELECT
STEP.STEP_ID ,
STEP."SEQUENCE",
STEP.REPORTING_CENTER_BO,
STEP.ERP_OPERATION ,
OP.HANDLE AS OPERATION_BO,
OP.OPERATION ,
OPT.DESCRIPTION OPERATION_DESC
FROM ROUTER R
JOIN ROUTER_STEP STEP ON R.HANDLE = STEP.ROUTER_BO
JOIN ROUTER_OPERATION RO ON STEP.HANDLE = RO.ROUTER_STEP_BO
JOIN OPERATION OP ON 'OperationBO:' || #{site} || ',' || OP.OPERATION || ',#' = RO.OPERATION_BO AND OP.CURRENT_REVISION = 'true'
JOIN OPERATION_T OPT ON OP.HANDLE = OPT.OPERATION_BO AND OPT.LOCALE = #{locale}
WHERE R.HANDLE = #{routerBo}
AND OP.SITE = #{site}
ORDER BY STEP."SEQUENCE"
</select>
</mapper>

@ -358,4 +358,9 @@
LEFT JOIN CUSTOM_FIELDS CF2 ON CF2.HANDLE = UG.HANDLE AND CF2."ATTRIBUTE" = 'MESSAGE_NOTICE_TIME'
WHERE UG.USER_GROUP = #{userGroup} AND UG.SITE = #{site}
</select>
<select id="getUserGroupByUser" resultType="Integer">
SELECT COUNT(HANDLE) FROM USER_GROUP_MEMBER ugm
WHERE ugm.USER_OR_GROUP_GBO=#{userBO} AND USER_GROUP_BO=#{userGroupBO}
</select>
</mapper>

@ -0,0 +1,128 @@
package com.foreverwin.mesnac.production.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.production.model.AccessoryLog;
import com.foreverwin.mesnac.production.service.AccessoryLogService;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* @author Philip
* @since 2021-08-12
*/
@RestController
@RequestMapping("/Z-ACCESSORY-LOG")
public class AccessoryLogController {
@Autowired
public AccessoryLogService accessoryLogService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getAccessoryLogById(@PathVariable String id) {
return R.ok( accessoryLogService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getAccessoryLogList(AccessoryLog accessoryLog){
List<AccessoryLog> result;
QueryWrapper<AccessoryLog> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(accessoryLog);
result = accessoryLogService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<AccessoryLog> frontPage, AccessoryLog accessoryLog){
IPage result;
QueryWrapper<AccessoryLog> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(accessoryLog);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(AccessoryLog::getHandle, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getSite, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getWorkCenter, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getShopOrder, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getSfc, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getOperation, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getStepId, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getResrce, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getLabel, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getBatch, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getItem, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getRevision, frontPage.getGlobalQuery())
.or().like(AccessoryLog::getCreateUser, frontPage.getGlobalQuery())
);
}
result = accessoryLogService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param accessoryLog
* @return null
*/
@PostMapping
public R save(@RequestBody AccessoryLog accessoryLog) {
return R.ok(accessoryLogService.save(accessoryLog));
}
/**
*
* @param accessoryLog
* @return null
*/
@PutMapping
public R updateById(@RequestBody AccessoryLog accessoryLog) {
return R.ok(accessoryLogService.updateById(accessoryLog));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(accessoryLogService.removeById(id));
}
/**
*
* @param ids ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
public R removeByIds(List<String> ids){
return R.ok(accessoryLogService.removeByIds(ids));
}
}

@ -0,0 +1,18 @@
package com.foreverwin.mesnac.production.mapper;
import com.foreverwin.mesnac.production.model.AccessoryLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 使 Mapper
* </p>
*
* @author Philip
* @since 2021-08-12
*/
@Repository
public interface AccessoryLogMapper extends BaseMapper<AccessoryLog> {
}

@ -0,0 +1,280 @@
package com.foreverwin.mesnac.production.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 使
* </p>
*
* @author Philip
* @since 2021-08-12
*/
@TableName("Z_ACCESSORY_LOG")
public class AccessoryLog extends Model<AccessoryLog> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("WORK_CENTER")
private String workCenter;
/**
*
*/
@TableField("SHOP_ORDER")
private String shopOrder;
/**
*
*/
@TableField("SFC")
private String sfc;
/**
*
*/
@TableField("OPERATION")
private String operation;
/**
*
*/
@TableField("STEP_ID")
private String stepId;
/**
*
*/
@TableField("RESRCE")
private String resrce;
/**
*
*/
@TableField("LABEL")
private String label;
/**
*
*/
@TableField("BATCH")
private String batch;
/**
*
*/
@TableField("ITEM")
private String item;
/**
*
*/
@TableField("REVISION")
private String revision;
/**
* 使
*/
@TableField("QTY")
private Double qty;
/**
*
*/
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getWorkCenter() {
return workCenter;
}
public void setWorkCenter(String workCenter) {
this.workCenter = workCenter;
}
public String getShopOrder() {
return shopOrder;
}
public void setShopOrder(String shopOrder) {
this.shopOrder = shopOrder;
}
public String getSfc() {
return sfc;
}
public void setSfc(String sfc) {
this.sfc = sfc;
}
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation;
}
public String getStepId() {
return stepId;
}
public void setStepId(String stepId) {
this.stepId = stepId;
}
public String getResrce() {
return resrce;
}
public void setResrce(String resrce) {
this.resrce = resrce;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getBatch() {
return batch;
}
public void setBatch(String batch) {
this.batch = batch;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public String getRevision() {
return revision;
}
public void setRevision(String revision) {
this.revision = revision;
}
public Double getQty() {
return qty;
}
public void setQty(Double qty) {
this.qty = qty;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String WORK_CENTER = "WORK_CENTER";
public static final String SHOP_ORDER = "SHOP_ORDER";
public static final String SFC = "SFC";
public static final String OPERATION = "OPERATION";
public static final String STEP_ID = "STEP_ID";
public static final String RESRCE = "RESRCE";
public static final String LABEL = "LABEL";
public static final String BATCH = "BATCH";
public static final String ITEM = "ITEM";
public static final String REVISION = "REVISION";
public static final String QTY = "QTY";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "AccessoryLog{" +
"handle = " + handle +
", site = " + site +
", workCenter = " + workCenter +
", shopOrder = " + shopOrder +
", sfc = " + sfc +
", operation = " + operation +
", stepId = " + stepId +
", resrce = " + resrce +
", label = " + label +
", batch = " + batch +
", item = " + item +
", revision = " + revision +
", qty = " + qty +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
"}";
}
}

@ -0,0 +1,28 @@
package com.foreverwin.mesnac.production.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.production.model.AccessoryLog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
* 使
* </p>
*
* @author Philip
* @since 2021-08-12
*/
public interface AccessoryLogService extends IService<AccessoryLog> {
/**
*
* @param frontPage
* @return
*/
IPage<AccessoryLog> selectPage(FrontPage<AccessoryLog> frontPage, AccessoryLog accessoryLog);
List<AccessoryLog> selectList(AccessoryLog accessoryLog);
}

@ -0,0 +1,46 @@
package com.foreverwin.mesnac.production.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.production.model.AccessoryLog;
import com.foreverwin.mesnac.production.mapper.AccessoryLogMapper;
import com.foreverwin.mesnac.production.service.AccessoryLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
* 使
* </p>
*
* @author Philip
* @since 2021-08-12
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class AccessoryLogServiceImpl extends ServiceImpl<AccessoryLogMapper, AccessoryLog> implements AccessoryLogService {
@Autowired
private AccessoryLogMapper accessoryLogMapper;
@Override
public IPage<AccessoryLog> selectPage(FrontPage<AccessoryLog> frontPage, AccessoryLog accessoryLog) {
QueryWrapper<AccessoryLog> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(accessoryLog);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<AccessoryLog> selectList(AccessoryLog accessoryLog) {
QueryWrapper<AccessoryLog> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(accessoryLog);
return super.list(queryWrapper);
}
}

@ -332,7 +332,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
}
}
//报工
//sendErp(postMapList);
sendErp(postMapList);
}
public void materialConsumption(String site, String operation, String sfcBo, String stepId, String resource) {
@ -468,7 +468,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
struOut.setAufnr("");
struOut.setVornr("");
struOut.setAueru("1");
struOut.setLmnga(new BigDecimal(1));
struOut.setLmnga(BigDecimal.ZERO);
struOut.setRet("");
struOut.setMsg("");
outs[0] = struOut;

@ -223,7 +223,7 @@ public class SfcScrapServiceImpl extends ServiceImpl<SfcScrapMapper, SfcScrap> i
}
wordMap.put("GF",(wordMap.get("TYPE").contains("GF"))? "✔": " ");
wordMap.put("LF",(wordMap.get("TYPE").contains("LF"))? "✔": " ");
wordMap.put("OT",(wordMap.get("TYPE").contains("QT"))? "✔": " ");
wordMap.put("OT",(wordMap.get("TYPE").contains("OT"))? "✔": " ");
wordMap.put("OPINION","报废");
wordMap.put("YEAR",year + "");
wordMap.put("MONTH",month + "");

@ -0,0 +1,482 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.production.mapper.AccessoryLogMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.production.model.AccessoryLog">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="WORK_CENTER" property="workCenter" />
<result column="SHOP_ORDER" property="shopOrder" />
<result column="SFC" property="sfc" />
<result column="OPERATION" property="operation" />
<result column="STEP_ID" property="stepId" />
<result column="RESRCE" property="resrce" />
<result column="LABEL" property="label" />
<result column="BATCH" property="batch" />
<result column="ITEM" property="item" />
<result column="REVISION" property="revision" />
<result column="QTY" property="qty" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, WORK_CENTER, SHOP_ORDER, SFC, OPERATION, STEP_ID, RESRCE, LABEL, BATCH, ITEM, REVISION, QTY, CREATE_USER, CREATED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_ACCESSORY_LOG WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_ACCESSORY_LOG
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_ACCESSORY_LOG WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_ACCESSORY_LOG
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.production.model.AccessoryLog">
INSERT INTO Z_ACCESSORY_LOG
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="workCenter!=null">WORK_CENTER,</if>
<if test="shopOrder!=null">SHOP_ORDER,</if>
<if test="sfc!=null">SFC,</if>
<if test="operation!=null">OPERATION,</if>
<if test="stepId!=null">STEP_ID,</if>
<if test="resrce!=null">RESRCE,</if>
<if test="label!=null">LABEL,</if>
<if test="batch!=null">BATCH,</if>
<if test="item!=null">ITEM,</if>
<if test="revision!=null">REVISION,</if>
<if test="qty!=null">QTY,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="workCenter!=null">#{workCenter},</if>
<if test="shopOrder!=null">#{shopOrder},</if>
<if test="sfc!=null">#{sfc},</if>
<if test="operation!=null">#{operation},</if>
<if test="stepId!=null">#{stepId},</if>
<if test="resrce!=null">#{resrce},</if>
<if test="label!=null">#{label},</if>
<if test="batch!=null">#{batch},</if>
<if test="item!=null">#{item},</if>
<if test="revision!=null">#{revision},</if>
<if test="qty!=null">#{qty},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.production.model.AccessoryLog">
INSERT INTO Z_ACCESSORY_LOG
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{workCenter},
#{shopOrder},
#{sfc},
#{operation},
#{stepId},
#{resrce},
#{label},
#{batch},
#{item},
#{revision},
#{qty},
#{createUser},
#{createdDateTime},
</trim>
</insert>
<update id="updateById">
UPDATE Z_ACCESSORY_LOG <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.label!=null">LABEL=#{et.label},</if>
<if test="et.batch!=null">BATCH=#{et.batch},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.revision!=null">REVISION=#{et.revision},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_ACCESSORY_LOG <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
WORK_CENTER=#{et.workCenter},
SHOP_ORDER=#{et.shopOrder},
SFC=#{et.sfc},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
RESRCE=#{et.resrce},
LABEL=#{et.label},
BATCH=#{et.batch},
ITEM=#{et.item},
REVISION=#{et.revision},
QTY=#{et.qty},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_ACCESSORY_LOG <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.label!=null">LABEL=#{et.label},</if>
<if test="et.batch!=null">BATCH=#{et.batch},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.revision!=null">REVISION=#{et.revision},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteById">
DELETE FROM Z_ACCESSORY_LOG WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_ACCESSORY_LOG
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_ACCESSORY_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<delete id="deleteBatchIds">
DELETE FROM Z_ACCESSORY_LOG WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -431,7 +431,7 @@
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="generatorWord" resultType="hashmap">
SELECT DISTINCT NVL(WC.WORK_CENTER,' ') WORK_CENTER,NVL(WO.VALUE,' ') WORK_ORDER,NVL(WO2.VALUE,' ') DWG_NO,NVL(ZSS.QTY,0) QTY,NVL(ZSS.OPERATION,' ') OPERATION,
SELECT DISTINCT NVL(WCT.DESCRIPTION,' ') WORK_CENTER,NVL(WO.VALUE,' ') WORK_ORDER,NVL(WO2.VALUE,' ') DWG_NO,NVL(ZSS.QTY,0) QTY,NVL(ZSS.OPERATION,' ') OPERATION,
NVL(ZSS.REASON,' ') REASON,NVL(ZSS."TYPE",' ') "TYPE",
CASE WHEN I1.VALUE != NULL THEN NVL(I1.VALUE * I.QTY_MULTIPLIER,0)
WHEN I2.VALUE != NULL THEN NVL(I2.VALUE * I.QTY_MULTIPLIER,0)
@ -440,6 +440,7 @@
FROM
SHOP_ORDER SO
LEFT JOIN WORK_CENTER WC ON SO.PLANNED_WORK_CENTER_BO = WC.HANDLE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS WO2 ON WO2.HANDLE = SO.PLANNED_ITEM_BO AND WO2."ATTRIBUTE" = 'DWG_NO'
INNER JOIN SFC S ON S.SFC = #{sfc} AND S.SITE = #{site}

Loading…
Cancel
Save