Browse Source

报表优化&acs日志优化

master
psh 4 months ago
parent
commit
0da286653e
  1. 50
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/SsxSiteDeviceDriver.java
  2. 8
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java
  3. 15
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/ReportController.java
  4. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/IReportService.java
  5. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dao/mapper/ReportMapper.xml
  6. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dto/HwDto.java
  7. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dto/YlDto.java
  8. 31
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/impl/ReportServiceImpl.java
  9. 2
      lms/nladmin-ui/src/views/wms/hw/detail/index.vue
  10. 2
      lms/nladmin-ui/src/views/wms/ycl/detail/index.vue

50
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/ssx_site/SsxSiteDeviceDriver.java

@ -283,30 +283,32 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
message = "";
Instruction instruction = null;
List toInstructions;
switch (mode) {
case 1:
log.debug("设备运转模式:等待工作");
return;
case 2:
break;
case 5:
log.info("呼叫空盅");
this.apply(5);
break;
case 6:
log.info("空盅出库");
this.apply(6);
break;
case 7:
log.info("呼叫满料");
this.apply(7);
break;
case 8:
if(ObjectUtils.isNotEmpty(sub_tray)&&ObjectUtils.isNotEmpty(mother_tray)) {
log.info("满料出库");
this.apply(8);
}
break;
if(!requireSucess) {
switch (mode) {
case 1:
log.debug("设备运转模式:等待工作");
return;
case 2:
break;
case 5:
log.info("呼叫空盅");
this.apply(5);
break;
case 6:
log.info("空盅出库");
this.apply(6);
break;
case 7:
log.info("呼叫满料");
this.apply(7);
break;
case 8:
if (ObjectUtils.isNotEmpty(sub_tray) && ObjectUtils.isNotEmpty(mother_tray)) {
log.info("满料出库");
this.apply(8);
}
break;
}
}
}

8
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java

@ -426,19 +426,19 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
Object obj = accessor_value.getValue(relate);
sb.append("key:" + relate + "value:" + obj + ";");
}
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb});
// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{};信号快照:{}", new Object[]{itemId, his, value, sb});
} else {
if(his instanceof int[]){
if(!Arrays.equals((long[]) his, (long[]) value)){
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
}
} else if(his instanceof String){
if(!StrUtil.equals((CharSequence) his, (CharSequence) value)){
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
}
} else {
log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value});
}
// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{}", new Object[]{itemId, his, value});
}

15
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/ReportController.java

@ -50,12 +50,21 @@ public class ReportController {
}
@SneakyThrows
@GetMapping("/yl/download")
@GetMapping("/yl/detail/download")
@Log("查询详情导出")
@ApiOperation("查询详情导出")
//@SaCheckPermission("@el.check('material:list')")
public void queryDetailDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
reportService.queryYlDownload(whereJson,page,response);
public void queryYlDetailDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
reportService.queryYlDetailDownload(whereJson,page,response);
}
@SneakyThrows
@GetMapping("/hw/detail/download")
@Log("查询详情导出")
@ApiOperation("查询详情导出")
//@SaCheckPermission("@el.check('material:list')")
public void queryHwDetailDownload(ReportQuery whereJson, PageQuery page, HttpServletResponse response){
reportService.queryHwDetailDownload(whereJson,page,response);
}
@GetMapping("/getSupplierNameList")

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/IReportService.java

@ -27,7 +27,9 @@ public interface IReportService extends IService<ReportDto> {
IPage<YlDto> queryYlDetail(ReportQuery whereJson, PageQuery pageable);
void queryYlDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
void queryYlDetailDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
void queryHwDetailDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;
List<String> getSupplierNameList();

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dao/mapper/ReportMapper.xml

@ -43,6 +43,7 @@
p.vehicle_code2 as subTray,
p.vehicle_code as motherTray,
p.update_time as updateTime,
m.siliconGrade,
m.productDescription,
m.supplierName,
m.ingotBatch,
@ -85,6 +86,7 @@
p.vehicle_code AS motherTray,
p.update_time AS updateTime,
ANY_VALUE ( v.standing_time ) AS standingTime,
ANY_VALUE ( m.siliconGrade ) AS siliconGrade,
ANY_VALUE ( m.productDescription ) AS productDescription,
ANY_VALUE ( m.supplierName ) AS supplierName,
ANY_VALUE ( m.ingotBatch ) AS ingotBatch,

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dto/HwDto.java

@ -30,4 +30,8 @@ public class HwDto implements Serializable {
private String usedTime;
/** 数量 */
private String number;
/** 棒源等级 */
private String siliconGrade;
/** 客户来料批次号 */
private String ingotBatch;
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dto/YlDto.java

@ -26,7 +26,7 @@ public class YlDto implements Serializable {
/** 入库时间 */
private String updateTime;
/** 棒源等级 */
private String barLevel;
private String siliconGrade;
/** 客户来料批次号 */
private String ingotBatch;
/** 晶棒号 */

31
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/impl/ReportServiceImpl.java

@ -58,7 +58,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
@Override
public void queryYlDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
public void queryYlDetailDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
pageQuery.setSize(99999);
IPage<YlDto> pages = this.queryYlDetail(query,pageQuery);
List<Map<String, Object>> list = new ArrayList<>();
@ -73,7 +73,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
mp.put("物料名称",detailDto.getProductDescription());
mp.put("供应商名称",detailDto.getSupplierName());
mp.put("入库时间",detailDto.getUpdateTime());
mp.put("棒源等级",detailDto.getBarLevel());
mp.put("棒源等级",detailDto.getSiliconGrade());
mp.put("客户来料批次号",detailDto.getIngotBatch());
mp.put("晶棒号",detailDto.getLotSN());
mp.put("来料长度",detailDto.getIncomingLength());
@ -83,6 +83,33 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
FileUtil.downloadExcel(list, response);
}
@Override
public void queryHwDetailDownload(ReportQuery query, PageQuery pageQuery, HttpServletResponse response) throws IOException {
pageQuery.setSize(99999);
IPage<HwDto> pages = this.queryHwDetail(query,pageQuery);
List<Map<String, Object>> list = new ArrayList<>();
for(HwDto detailDto:pages.getRecords()){
Map<String, Object> mp = new LinkedHashMap<>();
mp.put("点位编码",detailDto.getPointCode());
mp.put("点位名称",detailDto.getPointCode());
mp.put("区域编码",detailDto.getRegionCode());
mp.put("区域名称",detailDto.getRegionName());
mp.put("子托号",detailDto.getSubTray());
mp.put("母拖号",detailDto.getMotherTray());
mp.put("物料名称",detailDto.getProductDescription());
mp.put("供应商名称",detailDto.getSupplierName());
mp.put("入库时间",detailDto.getUpdateTime());
mp.put("棒源等级",detailDto.getSiliconGrade());
mp.put("客户来料批次号",detailDto.getIngotBatch());
mp.put("回温时间",detailDto.getStandingTime());
mp.put("已回温时间",detailDto.getUsedTime());
mp.put("数量",detailDto.getNumber());
list.add(mp);
}
FileUtil.downloadExcel(list, response);
}
public List<String> getSupplierNameList(){
return reportMapper.getSupplierNameList();
}

2
lms/nladmin-ui/src/views/wms/hw/detail/index.vue

@ -238,7 +238,7 @@
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
<el-table-column prop="batch" label="批次" :min-width="flexWidth('batch',crud.data,'批次')" />
<el-table-column prop="barLevel" label="棒源等级" :min-width="flexWidth('barLevel',crud.data,'棒源等级')" />
<el-table-column prop="siliconGrade" label="棒源等级" :min-width="flexWidth('siliconGrade',crud.data,'棒源等级')" />
<el-table-column prop="number" label="每托数量(根)" :min-width="flexWidth('number',crud.data,'每托数量(根)')" />
<el-table-column prop="updateTime" label="入库时间" :min-width="170" />
<el-table-column prop="standingTime" label="回温时间H" :min-width="70" />

2
lms/nladmin-ui/src/views/wms/ycl/detail/index.vue

@ -239,7 +239,7 @@
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
<el-table-column prop="lotSN" label="晶体编号" :min-width="flexWidth('lotSN',crud.data,'晶体编号')" />
<el-table-column prop="ingotBatch" label="批次" :min-width="flexWidth('ingotBatch',crud.data,'客户来料批次号')" />
<el-table-column prop="barLevel" label="棒源等级" :min-width="flexWidth('barLevel',crud.data,'棒源等级')" />
<el-table-column prop="siliconGrade" label="棒源等级" :min-width="flexWidth('siliconGrade',crud.data,'棒源等级')" />
<el-table-column prop="updateTime" label="入库时间" :min-width="70" />
<el-table-column prop="incomingWeight" label="重量KG" :min-width="70" />
<el-table-column prop="incomingLength" label="长度mm" :min-width="flexWidth('incomingLength',crud.data,'长度mm')" />

Loading…
Cancel
Save