Selaa lähdekoodia

Merge remote-tracking branch 'origin/mode-min-unit' into mode-min-unit

fangpy 8 kuukautta sitten
vanhempi
commit
6e1028a395

+ 1 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsBlankOrderDao.java

@@ -139,6 +139,6 @@ public interface ApsBlankOrderDao extends BaseMapper<ApsBlankOrderDo> {
     @Select("select count(1) from aps_work_in_progress_inventory where DELETED = 0 AND (BLANKBATCHNUMBER =  #{batchNumber} OR BLANKBATCHNUMBER like CONCAT(#{batchNumber},'-%') OR #{batchNumber} like CONCAT(BLANKBATCHNUMBER,'-%'))")
     Integer selectCountWorkIn(@Param("batchNumber") String batchNumber);
 
-    @Select("select GROUP_CONCAT(distinct IF(b.BACHMATERIALPROCESS = '', null,b.BACHMATERIALPROCESS) ) AS 'BACHMATERIALPROCESS' from aps_process_operation a LEFT JOIN aps_process_operation_process_equ b ON b.DELETED = 0 AND a.ID = b.PROCESSID where a.DELETED = 0 AND a.ID = #{processId} AND a.PREVIOUSPROCESSID is null group by a.ID")
+    @Select("select GROUP_CONCAT(distinct IF(b.BACHMATERIALPROCESS = '', null,b.BACHMATERIALPROCESS) ) AS 'BACHMATERIALPROCESS' from aps_process_operation a LEFT JOIN aps_process_operation_process_equ b ON b.DELETED = 0 AND a.ID = b.PROCESSID where a.DELETED = 0 AND a.ID = #{processId} AND (a.PREVIOUSPROCESSID is null OR a.PREVIOUSPROCESSID = '') group by a.ID")
     String selectBatchNumbersByProcessId(@Param("processId") String processId);
 }

+ 3 - 3
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ReportCheckServiceImpl.java

@@ -228,9 +228,9 @@ public class ReportCheckServiceImpl implements ReportCheckService {
             apsReportOutputService.update(new LambdaUpdateWrapper<ApsReportOutputDo>()
                     .in(ApsReportOutputDo::getId, reportOutputDos.stream().map(ApsReportOutputDo::getId).collect(Collectors.toList()))
                     .set(ApsReportOutputDo::getCheckstatus, VERIFIED));
-            if (reportOutputDos.stream().anyMatch(info -> NO.equals(info.getQualified())) && "已发布计划".equals(productionOrderDo.getAuditstatus())) {
-                goBackWf(processOperationEquId, blankId, productionOrderDo);
-            }
+//            if (reportOutputDos.stream().anyMatch(info -> NO.equals(info.getQualified())) && "已发布计划".equals(productionOrderDo.getAuditstatus())) {
+//                goBackWf(processOperationEquId, blankId, productionOrderDo);
+//            }
         } finally {
             log.debug("从map中清空当前报工记录:{}",id);
             redisService.getRedisTemplate().delete(id);

+ 8 - 7
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/PointCheckServiceImpl.java

@@ -44,6 +44,8 @@ import java.io.*;
 import java.lang.reflect.InvocationTargetException;
 import java.util.*;
 import java.util.stream.Collectors;
+
+import static com.rongwei.safecommon.utils.SaveConstans.COMPANY_MAP;
 import static com.rongwei.sfcommon.utils.CommonUtil.streamCodeGeneration;
 
 @Service("pointCheckService")
@@ -489,7 +491,6 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
         //3.获取点检记录模板
         String fullPath = pointCheckItemService.getExcelTempPath(excelData.getPagePartId(),excelData.getFileTemplateName());
 
-      //  fullPath="C:\\360安全浏览器下载\\"+excelData.getFileTemplateName();
         XSSFWorkbook workbook =null;
 
         try {
@@ -588,18 +589,18 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
 
         //填充主表数据
         sheet.getRow(indexstart+0).getCell(0).setCellValue(pointCheckVo.getPointcheckname()); //点检名称
-        sheet.getRow(indexstart+1).getCell(0).setCellValue(pointCheckVo.getTenantid()); //所属工厂
+        sheet.getRow(indexstart+1).getCell(0).setCellValue(COMPANY_MAP.get(pointCheckVo.getTenantid())); //所属工厂
         sheet.getRow(indexstart+1).getCell(2).setCellValue(pointCheckVo.getWorkshopname()); //车间名称
         sheet.getRow(indexstart+1).getCell(4).setCellValue(pointCheckVo.getPointcheckcode()); //记录编号
         sheet.getRow(indexstart+2).getCell(0).setCellValue(pointCheckVo.getCheckitemname()); //设备名称
         sheet.getRow(indexstart+2).getCell(2).setCellValue(pointCheckVo.getCheckitemcode()); //设备编号
         sheet.getRow(indexstart+2).getCell(4).setCellValue(pointCheckVo.getTemplatetypename()); //检查类型
-        sheet.getRow(indexstart+3).getCell(0).setCellValue(pointCheckVo.getCreateusername()); //点检人员
-        sheet.getRow(indexstart+3).getCell(2).setCellValue(pointCheckVo.getChecktime()); // 点检时间
+        sheet.getRow(indexstart+3).getCell(0).setCellValue("点检人:"+(pointCheckVo.getCreateusername()==null?"":pointCheckVo.getCreateusername())); //点检人员
+        sheet.getRow(indexstart+3).getCell(2).setCellValue("点检时间:"+(pointCheckVo.getChecktime()==null?"":pointCheckVo.getChecktimestr())); // 点检时间
         sheet.getRow(indexstart+3).getCell(4).setCellValue(pointCheckVo.getShiftname()); //班次
-        sheet.getRow(indexstart+4).getCell(0).setCellValue(pointCheckVo.getConfirmoruser()); //点检确认人
-        sheet.getRow(indexstart+4).getCell(2).setCellValue("点检时是否停机:"+pointCheckVo.getClosingdownname()==null?"":pointCheckVo.getClosingdownname()); //点检是否停机
-        sheet.getRow(indexstart+4).getCell(4).setCellValue("结果:"+pointCheckVo.getCheckresultname()==null?"":pointCheckVo.getCheckresultname()); //点检结果
+        sheet.getRow(indexstart+4).getCell(0).setCellValue("确认人:"+(pointCheckVo.getConfirmoruser()==null?"":pointCheckVo.getConfirmoruser())); //点检确认人
+        sheet.getRow(indexstart+4).getCell(2).setCellValue("点检时是否停机:"+(pointCheckVo.getClosingdownname()==null?"":pointCheckVo.getClosingdownname())); //点检是否停机
+        sheet.getRow(indexstart+4).getCell(4).setCellValue("结果:"+(pointCheckVo.getCheckresultname()==null?"":pointCheckVo.getCheckresultname())); //点检结果
 
         for (int i = 0; i <7; i++) {
             sheet.getRow(indexstart+5).getCell(i).setCellValue(detailTieleRow.getCell(i).getStringCellValue());

+ 2 - 1
cx-safe-check/cx-save-check-common/src/main/resources/mybatis/PointCheckDao.xml

@@ -10,7 +10,8 @@
         c.NAME AS TEMPLATETYPENAME,
         d.NAME AS SHIFTNAME,
         e.NAME AS CLOSINGDOWNNAME,
-        f.NAME AS CHECKRESULTNAME
+        f.NAME AS CHECKRESULTNAME,
+        DATE_FORMAT(a.CHECKTIME, '%Y-%m-%d %H:%i:%s') CHECKTIMESTR
         FROM
             asp_point_check a
              LEFT JOIN asp_check_items b ON a.CHECKITEMID = b.id and b.DELETED='0'

+ 2 - 0
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/vo/PointCheckVo.java

@@ -40,6 +40,8 @@ public class PointCheckVo extends PointCheckDo {
     private String closingdownname;
     // 点检结果 名称
     private String checkresultname;
+    //点检时间字符串
+    private String checktimestr;
 
 
 }