Leon 3 years ago
commit 48f2bb515c

@ -115,6 +115,7 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
@Override
public void sfcLabelPrint(Map<String,Object> map) {
Integer qty = (Integer) map.get("qty");
String itemBo = (String) map.get("itemBo");
List<LabelPrintDto> labelPrintDtoList = (List<LabelPrintDto>) map.get("labelPrintDtoList");
// 解决无法获取list中对象的问题
@ -143,8 +144,8 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
printLogService.updateById(printLog1);
}else{
labelPrintDto.setQty(BigDecimal.valueOf(qty));
printLog.setCreateUser(labelPrintDto.getPrintTemplate());
printLog.setPrintParam(JSON.toJSONString(labelPrintDto));
printLog.setItemBo(itemBo);
printLog.setItem(labelPrintDto.getItem());
printLog.setPrintName(labelPrintDto.getPrinter());
printLog.setPrintTemplate(labelPrintDto.getPrintTemplate());
@ -170,7 +171,6 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
if (code != 0){
throw BusinessException.build(msg);
}
}
}

@ -468,6 +468,7 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
labelPrintDto.setPrintTemplate(type);
labelPrintDto.setShopOrder(shopOrder);
labelPrintDto.setItem(selectCurrent.getItem());
labelPrintDto.setPrintNum(1);
labelPrintDto.setItemDescription(selectCurrent.getDescription());
labelPrintDto.setSfc(prodReadyTask.getSfc());
Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(site, prodReadyTask.getSfc()));
@ -525,12 +526,10 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
* -printNameisPrint
*/
JSONObject jsonObject = JSONObject.parseObject(post);
String code = jsonObject.getString("code");
if (code == null) {
}
if (post.indexOf("500") != -1) {
throw BusinessException.build("打印失败!");
Integer code = jsonObject.getInteger("code");
String msg = jsonObject.getString("msg");
if (code != 0){
throw BusinessException.build(msg);
}
if (printLogList.isEmpty()) {
printTag.setIsPrint("true");

@ -569,7 +569,7 @@
<!--根据sfcBo查询当前条码的打印信息-->
<select id="findSfcPrintInfoBySfc" resultType="com.foreverwin.mesnac.common.dto.LabelPrintDto">
SELECT IM.ITEM ,S.SFC, IT.DESCRIPTION ITEM_DESCRIPTION, ZSD.SHOP_ORDER,
SELECT IM.ITEM , I.ITEM_BO PRINTER, S.SFC, IT.DESCRIPTION ITEM_DESCRIPTION, ZSD.SHOP_ORDER,
I.QTY_ON_HAND QTY ,ZSD.BLANKING_SIZE , CF.VALUE DRAWING_REVISION
FROM INVENTORY I
LEFT JOIN SFC S ON I.INVENTORY_CONTEXT_GBO = S.HANDLE

@ -655,7 +655,7 @@
<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>
<if test="entity.status!=null and entity.status!='' and entity.status!='PRINT'"> AND ZPRT.STATUS=#{entity.status}</if>
<if test="entity.status!=null and entity.status!='' and entity.status!='PRINT'"> AND (ZPL.IS_PRINT is NULL OR ZPL.IS_PRINT='false' )AND ZPRT.STATUS=#{entity.status} </if>
<if test="entity.status!=null and entity.status!='' and entity.status eq 'PRINT' "> AND ZPL.IS_PRINT='true' AND ZPRT.STATUS='FINISH'</if>
<if test="entity.result!=null and entity.result!='' "> AND ZPRT.RESULT=#{entity.result}</if>
<if test="entity.sfcStepStatus!=null and entity.sfcStepStatus!='' and entity.sfcStepStatus=='COMPLETE' "> AND ZSD.DISPATCH_STATUS=#{entity.sfcStepStatus}</if>

@ -34,7 +34,7 @@ public interface CallItemMapper extends BaseMapper<CallItem> {
List<CallItem> findCallItemDetailList(CallItem callItem);
List<CallItem> findCallItemListPda(@Param("site") String site,@Param("local") String local,@Param("user") String user,@Param("callItem")CallItem callItem);
List<CallItem> findCallItemListPda(@Param("site") String site,@Param("locale") String locale,@Param("user") String user,@Param("callItem")CallItem callItem);
List<CallItem> findCallItemDetailListByDispatchBo(@Param("site") String site, @Param("list") List<String> list);

@ -197,6 +197,12 @@ public class CallItem extends Model<CallItem> {
private Date requireFromDate;
@TableField(exist = false)
private Date requireToDate;
/**规格**/
@TableField(exist = false)
private String spec;
/**材质**/
@TableField(exist = false)
private String texture;
public String getHandle() {
return handle;
@ -614,6 +620,22 @@ public class CallItem extends Model<CallItem> {
this.requireToDate = requireToDate;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getTexture() {
return texture;
}
public void setTexture(String texture) {
this.texture = texture;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";

@ -1074,8 +1074,9 @@
SELECT MML.* , ZSD.PLANNED_START_DATE FROM
( SELECT ZCI.SITE, CF.VALUE WORK_ORDER, ZCI.STATUS ,WC.WORK_CENTER, WCT.DESCRIPTION WORK_CENTER_DESCRIPTION,
ZCI.SHOP_ORDER , ZCI.RESRCE,
IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION,ZCI.COMPONENT_BO ,
CP.ITEM COMPONENT, ITT.DESCRIPTION COMPONENT_DESCRIPTION, ZSD.BLANKING_SIZE,
IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION,
ZCI.COMPONENT_BO , CP.ITEM COMPONENT, ITT.DESCRIPTION COMPONENT_DESCRIPTION,
CFA.VALUE SPEC, CFB.VALUE TEXTURE, ZSD.BLANKING_SIZE,
/*MIN(ZSD.PLANNED_START_DATE) ,
MIN(SO.PLANNED_START_DATE) , ZCI.CALL_TYPE,*/
SUM(ZCI.REQUIRED_QTY) REQUIRED_QTY
@ -1084,12 +1085,14 @@
INNER JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZCI.SHOP_ORDER AND SO.SITE = ZCI.SITE
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = ZCI.SITE
INNER JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
INNER JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
INNER JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
INNER JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = #{locale}
INNER JOIN ITEM CP ON CP.HANDLE = ZCI.COMPONENT_BO
INNER JOIN ITEM_T ITT ON ITT.ITEM_BO = CP.HANDLE
WHERE ZCI.SITE = #{site} AND WCT.LOCALE = #{local} AND IT.LOCALE = #{local} AND ITT.LOCALE = #{local}
INNER JOIN ITEM_T ITT ON ITT.ITEM_BO = CP.HANDLE AND ITT.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS CFA ON CFA.HANDLE = CP.HANDLE AND CFA."ATTRIBUTE" = 'MAT_SPEC'
LEFT JOIN CUSTOM_FIELDS CFB ON CFA.HANDLE = CP.HANDLE AND CFB."ATTRIBUTE" = 'TEXTTURE'
WHERE ZCI.SITE = #{site}
<if test="callItem.callType != null and callItem.callType != ''">
AND ZCI.CALL_TYPE = #{callItem.callType}
</if>
@ -1097,7 +1100,7 @@
AND ZSD.EMPLOYEE LIKE '%' ||#{user} || '%'
</if>
GROUP BY ZCI.SITE, CF.VALUE, ZCI.STATUS ,WC.WORK_CENTER, IM.ITEM, ZSD.BLANKING_SIZE, CP.ITEM, ZCI.RESRCE, ZCI.CALL_TYPE,ZCI.SHOP_ORDER ,ZCI.COMPONENT_BO ,
WCT.DESCRIPTION ,IT.DESCRIPTION , ITT.DESCRIPTION ) MML
WCT.DESCRIPTION ,IT.DESCRIPTION , ITT.DESCRIPTION ,CFA.VALUE , CFB.VALUE ) MML
LEFT JOIN
( SELECT MIN(ZSD.PLANNED_START_DATE) PLANNED_START_DATE,SHOP_ORDER FROM Z_SFC_DISPATCH zsd WHERE ZSD.SITE = #{site} GROUP BY ZSD.SHOP_ORDER) ZSD
ON ZSD.SHOP_ORDER = MML.SHOP_ORDER
@ -1108,20 +1111,28 @@
<if test="callItem.resrce != null and callItem.resrce != ''">
AND MML.RESRCE = #{callItem.resrce}
</if>
<if test="callItem.component != null and callItem.component != ''">
AND MML.COMPONENT = #{callItem.component}
<if test="callItem.componentDescription != null and callItem.componentDescription != ''">
AND MML.COMPONENT_DESCRIPTION LIKE '%'|| #{callItem.componentDescription} ||'%'
</if>
<if test="callItem.status != null and callItem.status != ''">
AND MML.STATUS = #{callItem.status}
</if>
<if test="callItem.spec != null and callItem.spec != ''">
AND MML.SPEC LIKE '%' || #{callItem.spec} || '%'
</if>
<if test="callItem.texture != null and callItem.texture != ''">
AND MML.TEXTURE LIKE '%' || #{callItem.texture} || '%'
</if>
<if test="callItem.startFromDate != null">
AND ZSD.PLANNED_START_DATE >= #{callItem.startFromDate}
</if>
<if test="callItem.startToDate != null">
AND ZSD.PLANNED_START_DATE &lt;= #{callItem.startToDate}
</if>
ORDER BY MML.SHOP_ORDER,MML.WORK_CENTER,MML.ITEM,MML.COMPONENT,MML.BLANKING_SIZE,ZSD.PLANNED_START_DATE
ORDER BY MML.COMPONENT_DESCRIPTION,MML.TEXTURE,MML.SPEC,MML.BLANKING_SIZE,ZSD.PLANNED_START_DATE
</select>
<!--ORDER BY MML.SHOP_ORDER,MML.WORK_CENTER,MML.ITEM,MML.COMPONENT,MML.BLANKING_SIZE,ZSD.PLANNED_START_DATE-->
<select id="findRefreshCallItemPda" resultMap="FullResultMap">
SELECT CI.HANDLE ,CI.SFC ,CI.COMPONENT_BO ,BC.QTY REQUIRED_QTY, CF.VALUE STEP_ID
FROM Z_CALL_ITEM CI

@ -148,8 +148,6 @@ public class ResourceInspectTaskController {
String resourceNo = resourceInspectTaskDto.getResrce();
String resourceTypeNo = resourceInspectTaskDto.getResourceTypeNo();
String workCenter = resourceInspectTaskDto.getWorkCenter();
String compareStartDate = resourceInspectTaskDto.getCompareStartDate();
String compareEndDate = resourceInspectTaskDto.getCompareEndDate();
if (planNo != null){
resourceInspectTaskDto.setResourceInspectPlanBo(HandleEnum.RESOURCE_INSPECT_PLAN.getHandle(site,planNo,resourceInspectTaskDto.getPlanRevision()));
}
@ -161,9 +159,6 @@ public class ResourceInspectTaskController {
}
if (workCenter != null){
resourceInspectTaskDto.setWorkCenter(HandleEnum.WORK_CENTER.getHandle(site,workCenter));
}
if (compareStartDate != null){
}
try{
return R.ok(resourceInspectTaskService.findResourceInspectTaskList(resourceInspectTaskDto));

@ -48,6 +48,6 @@ public interface ResourceInspectTaskMapper extends BaseMapper<ResourceInspectTas
*/
LocalDateTime getMaxCreateTimeByStatus(ResourceInspectTask resourceInspectTask);
Integer findResourceTaskByResrceAndCategory(@Param("site") String site,@Param("category") String category, @Param("resrce") String resrce);
Integer findResourceTaskByResrceAndCategory(@Param("site") String site,@Param("category") String category, @Param("resrce") String resrce,@Param("planHandle") String planHandle);
}

@ -141,7 +141,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
equip.setCreateUser(user);
equip.setCreatedDateTime(LocalDateTime.now());
String resourceNo = equip.getResourceNo();
Integer cnt = resourceInspectTaskMapper.findResourceTaskByResrceAndCategory(site, category, resourceNo);
Integer cnt = resourceInspectTaskMapper.findResourceTaskByResrceAndCategory(site, category, resourceNo,handle);
if (cnt > 0){
resInfo.append(resourceNo+",");
}
@ -149,7 +149,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
equip.setHandle(HandleEnum.RESOURCE_INSPECT_RESOURCE.getHandle(site,handle,resourceHandle));
resourceColl.add(equip);
}
if (!resInfo.equals("")){
if (!resInfo.toString().equals("[")){
throw BusinessException.build("设备编号" + resInfo.append("]") + "已经维护了相同点检类型的点检计划!");
}
resourceInspectResourceService.saveBatch(resourceColl);

@ -660,7 +660,7 @@
WHERE
(ZG.USER_GROUP_BO IS NULL OR (ZG.USER_GROUP_BO IS NOT NULL AND UGM.USER_OR_GROUP_GBO = #{currentUser}))
AND RIK.SITE = #{site}
AND TASK_CREATE_DATE &lt;= (SELECT TO_DATE(TO_CHAR(SYSDATE+1,'yyyy-mm-dd') || ' 00:00:00','yyyy-MM-dd hh24:mi-ss') -8/24 FROM DUAL)
AND TASK_CREATE_DATE &lt;= (SELECT TO_DATE(TO_CHAR(SYSDATE,'yyyy-mm-dd') || ' 00:00:00','yyyy-MM-dd hh24:mi-ss') -4/24 FROM DUAL)
<if test="taskNo != null and taskNo != ''">
AND RIK.TASK_NO = #{taskNo}
</if>
@ -732,7 +732,7 @@
<select id="findResourceTaskByResrceAndCategory" resultType="Integer">
SELECT COUNT(*) FROM Z_RESOURCE_INSPECT_TASK ZRIT
WHERE ZRIT.SITE = #{site} AND ZRIT.RESRCE = #{resrce} AND ZRIT.CATEGORY = #{category}
WHERE ZRIT.SITE = #{site} AND ZRIT.RESRCE = #{resrce} AND ZRIT.CATEGORY = #{category} AND ZRIT.RESOURCE_INSPECT_PLAN_BO != #{planHandle}
</select>
<!--自定义sql-->

@ -433,6 +433,7 @@
UPPER(#{item})
</foreach>
AND NC.STATUS_BO = 'StatusBO:' || #{site} || ',101'
AND NG.NC_GROUP LIKE 'QC\_%' ESCAPE '\'
</where>
</select>

Loading…
Cancel
Save