Leon 3 years ago
commit 24690b518b

@ -12,6 +12,7 @@ import com.foreverwin.mesnac.common.service.SfcDispatchCommonService;
import com.foreverwin.mesnac.meapi.service.NcCodeService;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import com.sap.me.frame.service.CommonMethods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -78,6 +79,7 @@ public class AbnormalBillController {
public R page(FrontPage<AbnormalBill> frontPage, AbnormalBill abnormalBill){
IPage result;
QueryWrapper<AbnormalBill> queryWrapper = new QueryWrapper<>();
abnormalBill.setSite(CommonMethods.getSite());
queryWrapper.setEntity(abnormalBill);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query

@ -162,6 +162,8 @@ public class AbnormalBillLogServiceImpl extends ServiceImpl<AbnormalBillLogMappe
ncGroup.append(ncGroups.get(i)).append(",");
}
}
abnormalBillLog.setInspector(abnormalBillLog.getInspector());
abnormalBillLog.setPbUser(abnormalBillLog.getPbUser());
abnormalBillLog.setNcCodeGroup(ncGroup.toString());
abnormalBillLog.setCreatedUser(user);
abnormalBillLog.setCreatedDataTime(now);

@ -232,7 +232,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//判断是否是用户自报,如果是自报的话,调用孙豪的方法
if(!StringUtil.isBlank(abnormalBill.getInspector()) && Constants.NEW.equals(abnormalBill.getStatus())){
if(!StringUtil.isBlank(abnormalBill.getInspector()) && Constants.NEW.equals(abnormalBill.getStatus()) &&"B".equals(abnormalBill.getReportFrom())){
abnormalBill.setObjectBo(HandleEnum.SELF_REPORT.getHandle(abnormalBill.getSite(),abnormalBill.getObjectBo()));
selfReportService.updateState(abnormalBill.getObjectBo(), Constants.STATE_CONFIRM);
}
@ -274,8 +274,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalNcCode.setModifiedDateTime(now);
abnormalNcCodes.add(abnormalNcCode);
}
abnormalNcCodeService.saveOrUpdateBatch(abnormalNcCodes);
if(abnormalNcCodes.size() > 0){
abnormalNcCodeService.saveOrUpdateBatch(abnormalNcCodes);
}
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
this.saveOrUpdate(abnormalBill);
/**

@ -437,12 +437,12 @@
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</select>

@ -28,6 +28,12 @@ public class ShopOrderDto extends ShopOrder {
*/
private String workCenter;
/**
*
* @return
*/
private String map;
public String getWorkOrder() {
return workOrder;
}
@ -59,4 +65,12 @@ public class ShopOrderDto extends ShopOrder {
public void setWorkCenter(String workCenter) {
this.workCenter = workCenter;
}
public String getMap() {
return map;
}
public void setMap(String map) {
this.map = map;
}
}

@ -1009,11 +1009,12 @@
<!--根据工单找出工作令号,项目号,产品类别-->
<select id="findByShopOrderBo" resultType="com.foreverwin.mesnac.meapi.dto.ShopOrderDto">
SELECT WO.VALUE WORK_ORDER,ITEM.VALUE ITEM_NUMBER,PC.VALUE PRODUCT_CATEGORY,WC.WORK_CENTER
SELECT WO.VALUE WORK_ORDER,ITEM.VALUE ITEM_NUMBER,PC.VALUE PRODUCT_CATEGORY,WC.WORK_CENTER,MAP.VALUE MAP
FROM SHOP_ORDER SO
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS ITEM ON ITEM.HANDLE = SO.HANDLE AND ITEM."ATTRIBUTE" = 'ITEM_NUMBER'
LEFT JOIN CUSTOM_FIELDS PC ON PC.HANDLE = SO.HANDLE AND PC."ATTRIBUTE" = 'PRODUCT_CATEGORY'
LEFT JOIN CUSTOM_FIELDS MAP ON MAP.HANDLE = SO.HANDLE AND MAP."ATTRIBUTE" = 'MAP'
LEFT JOIN WORK_CENTER WC ON WC.HANDLE = SO.PLANNED_WORK_CENTER_BO
WHERE SO.HANDLE = #{handle}
</select>

@ -159,7 +159,7 @@ public class SfcScrapServiceImpl extends ServiceImpl<SfcScrapMapper, SfcScrap> i
sfcScrap.setModifiedDateTime(now);
//向生产派工那边发送数据
podTemplateService.sendErp(sfcScrap.getSfc(),sfcScrap.getStepId(),BigDecimal.valueOf(0L),BigDecimal.valueOf(sfcScrap.getQty()),BigDecimal.valueOf(0L));
// podTemplateService.sendErp(sfcScrap.getSfc(),sfcScrap.getStepId(),BigDecimal.valueOf(0L),BigDecimal.valueOf(sfcScrap.getQty()),BigDecimal.valueOf(0L));
try{
//调用mes公共接口报废

@ -436,7 +436,7 @@
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)
ELSE NVL(I.QTY_MULTIPLIER,0) END WEIGHT,NVL(I.ITEM,' ') ITEM,NVL(S.SFC,' ') SFC,NVL(it.DESCRIPTION,' ') ITEM_DESCRIPTION,
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZSS.DUTY_USER,' ') DUTY_USER
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZNU.FULL_NAME,' ') DUTY_USER
FROM
SHOP_ORDER SO
LEFT JOIN WORK_CENTER WC ON SO.PLANNED_WORK_CENTER_BO = WC.HANDLE
@ -448,6 +448,7 @@
LEFT JOIN OPERATION O ON O.OPERATION = ZSS.OPERATION AND O.SITE = SO.SITE
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZSS.DUTY_USER
LEFT JOIN ITEM_T it ON it.ITEM_BO = I.HANDLE AND it.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS I1 ON I1.HANDLE = I.HANDLE AND I1."ATTRIBUTE" = 'PER_METER'
LEFT JOIN CUSTOM_FIELDS I2 ON I2.HANDLE = I.HANDLE AND I2."ATTRIBUTE" = 'PER_SQUARE_METER'

@ -29,6 +29,7 @@ public class InspectionTaskManage implements Serializable {
private LocalDateTime createdDateTime;
private String modifyUser;
private LocalDateTime modifiedDateTime;
private String fullName;
private List<InspectionTaskManageDetail> inspectionTaskDetailList;
@ -215,4 +216,12 @@ public class InspectionTaskManage implements Serializable {
public void setInspectionTaskDetailList(List<InspectionTaskManageDetail> inspectionTaskDetailList) {
this.inspectionTaskDetailList = inspectionTaskDetailList;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
}

@ -151,6 +151,13 @@ public class SelfReport extends Model<SelfReport> {
@TableField(exist = false)
private String productCategory;
/**
* User
* @return
*/
@TableField(exist = false)
private String pbUser;
public String getProductCategory() {
return productCategory;
}
@ -343,6 +350,14 @@ public class SelfReport extends Model<SelfReport> {
this.description = description;
}
public String getPbUser() {
return pbUser;
}
public void setPbUser(String pbUser) {
this.pbUser = pbUser;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";

@ -25,15 +25,17 @@
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="FULL_NAME" property="fullName"/>
</resultMap>
<select id="findInspectionTask" resultMap="BaseResultMap">
SELECT B.HANDLE, B.SITE, B.CATEGORY, B.TASK_NO, B.DESCRIPTION, B.STATUS, B.INSPECTION_ITEM_BO, B.WORK_CENTER, B.SHOP_ORDER, B.SFC, B.OPERATION, B.STEP_ID, B.RESRCE, B.RESULT, B.COMMENTS, B.CREATE_USER, B.CREATED_DATE_TIME, B.MODIFY_USER, B.MODIFIED_DATE_TIME,
M.ITEM, Z.DESCRIPTION ITEM_DESCRIPTION
M.ITEM, Z.DESCRIPTION ITEM_DESCRIPTION,ZNU.FULL_NAME FULL_NAME
FROM Z_INSPECTION_TASK B
INNER JOIN SFC S ON S.SITE = B.SITE AND S.SFC = B.SFC
INNER JOIN SHOP_ORDER P ON P.HANDLE = S.SHOP_ORDER_BO
INNER JOIN ITEM M ON M.HANDLE = P.ITEM_BO
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = B.CREATE_USER
LEFT JOIN ITEM_T Z ON Z.ITEM_BO = M.HANDLE AND Z.LOCALE = 'zh'
WHERE B.SITE = #{site}
<if test="workCenter != null and workCenter != ''">

@ -24,6 +24,7 @@
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="NC_CODE_DESC" property="ncCodeDesc" />
<result column="REPORT_USER_GROUP" property="reportUserGroup" />
<result column="PB_USER" property="pbUser" />
</resultMap>
<!-- 通用查询结果列 -->
@ -559,7 +560,7 @@
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectListByCondition" resultMap="BaseResultMap">
SELECT ZSR.HANDLE, ZSR.SITE, ZSR.TASK_NO, ZSR.WORK_CENTER,ZSR.NC_CODE_DESC, ZSR.SHOP_ORDER, ZSR.ITEM, ZSR.OP_STEP, ZSR.RESRCE, ZSR.SFC, ZSR.NC_CODE, ZSR.NC_QTY, ZSR.LOCATION, ZSR.STATE, ZSR.REMARK, B.FULL_NAME CREATE_USER,ZSR. CREATED_DATE_TIME,IT.DESCRIPTION FROM Z_SELF_REPORT ZSR
SELECT ZSR.HANDLE, ZSR.SITE, ZSR.TASK_NO, ZSR.WORK_CENTER,ZSR.NC_CODE_DESC, ZSR.SHOP_ORDER, ZSR.ITEM, ZSR.OP_STEP, ZSR.RESRCE, ZSR.SFC, ZSR.NC_CODE, ZSR.NC_QTY, ZSR.LOCATION, ZSR.STATE, ZSR.REMARK, B.FULL_NAME CREATE_USER,ZSR. CREATED_DATE_TIME,IT.DESCRIPTION,ZSR.CREATE_USER PB_USER FROM Z_SELF_REPORT ZSR
JOIN ITEM I ON I.ITEM = ZSR.ITEM AND I.CURRENT_REVISION='true'
LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO AND IT.LOCALE = #{locale}
LEFT JOIN Z_NWA_USER B ON ZSR.SITE = B.SITE AND ZSR.CREATE_USER = B.USER_NAME

Loading…
Cancel
Save