Merge remote-tracking branch 'origin/main'

main
zhen 1 year ago
commit 2de2fd3d02
  1. 2
      src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.xml
  2. 2
      src/main/java/org/energy/modules/smart/controller/WorkOrderController.java
  3. 18
      src/main/java/org/energy/modules/smart/controller/WorkPermitController.java
  4. 20
      src/main/java/org/energy/modules/smart/mapper/WorkPermitMapper.xml
  5. 2
      src/main/java/org/energy/modules/smart/vo/WorkPermitVO.java
  6. 2
      src/main/java/org/energy/modules/spares/controller/MaterialClassificationController.java
  7. 7
      src/main/java/org/energy/modules/spares/entity/MaterialClassification.java
  8. 2
      src/main/java/org/energy/modules/spares/mapper/MaterialClassificationMapper.xml
  9. 11
      src/main/java/org/energy/modules/system/controller/RoleController.java
  10. 29
      src/main/java/org/energy/modules/system/service/IRoleDataService.java
  11. 152
      src/main/java/org/energy/modules/system/service/impl/RoleDataServiceImpl.java
  12. 39
      src/main/java/org/energy/modules/system/vo/HomePageVO.java

@ -82,7 +82,7 @@
and obj.is_deleted = '0'
where
task.is_deleted = '0'
and obj.kks_no = #{toolsCodeId}
and obj.tools_code_id = #{toolsCodeId}
</select>
</mapper>

@ -130,7 +130,7 @@ public class WorkOrderController extends DafController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(workOrderService.deleteLogic(Func.toLongList(ids)));
return R.status(workOrderService.removeByIds(Func.toLongList(ids)));
}
/**

@ -52,7 +52,9 @@ import com.dayu.daf.core.boot.ctrl.DafController;
import springfox.documentation.annotations.ApiIgnore;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -88,9 +90,8 @@ public class WorkPermitController extends DafController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入workPermit")
public R<IPage<WorkPermit>> list(WorkPermit workPermit, Query query) {
public R<IPage<WorkPermit>> list(WorkPermitVO workPermit, Query query) {
QueryWrapper<WorkPermit> qw = new QueryWrapper<>();
qw.orderByAsc("eq_ledger_code");
//场站
if (null != workPermit.getStations()) {
qw.lambda().eq(WorkPermit::getStations, workPermit.getStations());
@ -115,15 +116,18 @@ public class WorkPermitController extends DafController {
if (StringUtil.isNotEmpty(workPermit.getIssuer())) {
qw.lambda().like(WorkPermit::getIssuer, workPermit.getIssuer());
}
//计划开始时间
if (null != workPermit.getPlanStartDate()) {
qw.lambda().like(WorkPermit::getPlanStartDate, workPermit.getPlanStartDate());
}
//工作负责人
if (StringUtil.isNotEmpty(workPermit.getWorkChargePerson())) {
qw.lambda().like(WorkPermit::getWorkChargePerson, workPermit.getWorkChargePerson());
}
IPage<WorkPermit> pages = workPermitService.page(Condition.getPage(query), Condition.getQueryWrapper(workPermit));
//计划开始时间
if (null != workPermit.getPlanStartDateExt()) {
String planStartDate = workPermit.getPlanStartDateExt().substring(0,10);
qw.lambda().last(" and plan_start_date >= TO_TIMESTAMP('"+planStartDate + " 00:00:00','YYYY-MM-DD HH24:MI:SS')");
}
IPage<WorkPermit> pages = workPermitService.page(Condition.getPage(query), qw);
return R.data(pages);
}

@ -68,31 +68,31 @@
, work_state
, check_status
from
smt_work_permit
where is_deleted = 0
smt_work_permit a
where a.is_deleted = 0
<if test="vo.workTicketNo != null and vo.workTicketNo != ''">
and a.work_ticket_no = #{vo.workTicketNo}
and a.work_ticket_no LIKE CONCAT('%', #{vo.workTicketNo}, '%')
</if>
<if test="vo.workTicketType != null and vo.workTicketType != ''">
and a.work_ticket_type = #{vo.workTicketType}
and a.work_ticket_type LIKE CONCAT('%', #{vo.workTicketType}, '%')
</if>
<if test="vo.workChargePerson != null and vo.workChargePerson != ''">
and a.work_charge_person = #{vo.workChargePerson}
and a.work_charge_person LIKE CONCAT('%', #{vo.workChargePerson}, '%')
</if>
<if test="vo.licensors != null and vo.licensors != ''">
and a.licensors = #{vo.licensors}
and a.licensors LIKE CONCAT('%', #{vo.licensors}, '%')
</if>
<if test="vo.issuer != null and vo.issuer != ''">
and a.issuer = #{vo.issuer}
and a.issuer LIKE CONCAT('%', #{vo.issuer}, '%')
</if>
<if test="vo.planStartDate != null and vo.planStartDate != ''">
and a.plan_start_date = #{vo.planStartDate}
<if test="vo.planStartDateExt != null and vo.planStartDateExt != ''">
and a.plan_start_date &gt;= TO_TIMESTAMP(#{vo.planStartDateExt},'Dy Mon DD YYYY HH24:MI:SS')AT TIME ZONE 'GMT-8'
</if>
<if test="vo.workState != null and vo.workState != ''">
and a.work_state = #{vo.workState}
</if>
<if test="vo.stations != null and vo.stations != ''">
and b.stations = ${vo.stations}
and a.stations = #{vo.stations}
</if>
</select>

@ -17,4 +17,6 @@ import io.swagger.annotations.ApiModel;
public class WorkPermitVO extends WorkPermit {
private static final long serialVersionUID = 1L;
private String planStartDateExt;
}

@ -87,7 +87,7 @@ public class MaterialClassificationController extends DafController {
qw.lambda().like(MaterialClassification::getCode, materialClassification.getCode());
}
if (materialClassification.getType() != null) {
qw.lambda().eq(MaterialClassification::getType, materialClassification.getType());
qw.lambda().like(MaterialClassification::getType, materialClassification.getType());
}
qw.lambda().eq(MaterialClassification::getIsDeleted, DafConstant.DB_NOT_DELETED);
qw.lambda().orderByDesc(MaterialClassification::getUpdateTime);

@ -31,16 +31,15 @@ public class MaterialClassification extends BaseEntity {
@ApiModelProperty(value = "主键")
private Long id;
/**
* 物资分
* 物资分
*/
@ApiModelProperty(value = "物资分码")
@ApiModelProperty(value = "物资分码")
private String code;
/**
* 物资类型
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "物资类型")
private Integer type;
private String type;
}

@ -34,7 +34,7 @@
and a.code LIKE CONCAT('%', #{vo.code}, '%')
</if>
<if test="vo.type != null and vo.type != ''">
and a.type = #{vo.type}
and a.type LIKE CONCAT('%', #{vo.type}, '%')
</if>
order by a.update_time desc
</select>

@ -29,8 +29,10 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.energy.modules.system.entity.Role;
import org.energy.modules.system.service.IRoleDataService;
import org.energy.modules.system.service.IRoleService;
import org.energy.modules.system.vo.GrantVO;
import org.energy.modules.system.vo.HomePageVO;
import org.energy.modules.system.vo.RoleVO;
import org.energy.modules.system.wrapper.RoleWrapper;
import org.springframework.web.bind.annotation.*;
@ -56,6 +58,8 @@ public class RoleController extends DafController {
private IRoleService roleService;
private IRoleDataService roleDataService;
/**
* 详情
*/
@ -153,4 +157,11 @@ public class RoleController extends DafController {
return R.status(temp);
}
@GetMapping("/honePageData")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "首页数据", notes = "传入")
public R<HomePageVO> honePageData() {
return R.data(roleDataService.findCurrHomePageInfo());
}
}

@ -0,0 +1,29 @@
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.energy.modules.system.service;
import org.energy.modules.system.vo.HomePageVO;
/**
* 服务类
*
* @author DafX
*/
public interface IRoleDataService {
HomePageVO findCurrHomePageInfo();
}

@ -0,0 +1,152 @@
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.energy.modules.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dayu.daf.core.tool.constant.DafConstant;
import org.energy.modules.inspection.entity.InspectionTasks;
import org.energy.modules.inspection.service.IInspectionTasksService;
import org.energy.modules.leger.entity.EquipmentLedger;
import org.energy.modules.leger.entity.ToolInventoryRecord;
import org.energy.modules.leger.service.IEquipmentLedgerService;
import org.energy.modules.leger.service.IToolInventoryRecordService;
import org.energy.modules.release.entity.ProductionInformation;
import org.energy.modules.release.service.IProductionInformationService;
import org.energy.modules.smart.entity.OperationTicket;
import org.energy.modules.smart.entity.WorkOrder;
import org.energy.modules.smart.entity.WorkPermit;
import org.energy.modules.smart.service.IOperationTicketService;
import org.energy.modules.smart.service.IWorkOrderService;
import org.energy.modules.smart.service.IWorkPermitService;
import org.energy.modules.spares.entity.ManufacturerInfo;
import org.energy.modules.spares.entity.Material;
import org.energy.modules.spares.entity.SupplierInfo;
import org.energy.modules.spares.entity.Warehouse;
import org.energy.modules.spares.service.IManufacturerInfoService;
import org.energy.modules.spares.service.IMaterialService;
import org.energy.modules.spares.service.ISupplierInfoService;
import org.energy.modules.spares.service.IWarehouseService;
import org.energy.modules.system.service.IRoleDataService;
import org.energy.modules.system.vo.HomePageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 服务实现类
*
* @author DafX
*/
@Service
public class RoleDataServiceImpl implements IRoleDataService {
@Autowired
private IEquipmentLedgerService equipmentLedgerService;
@Autowired
private IToolInventoryRecordService toolInventoryRecordService;
@Autowired
private IOperationTicketService operationTicketService;
@Autowired
private IWorkPermitService workPermitService;
@Autowired
private IWarehouseService warehouseService;
@Autowired
private IManufacturerInfoService manufacturerInfoService;
@Autowired
private ISupplierInfoService supplierInfoService;
@Autowired
private IMaterialService materialService;
@Autowired
private IWorkOrderService workOrderService;
@Autowired
private IInspectionTasksService inspectionTasksService;
@Autowired
private IProductionInformationService productionInformationService;
@Override
public HomePageVO findCurrHomePageInfo() {
HomePageVO hp = new HomePageVO();
// Equipment Ledger Service
QueryWrapper<EquipmentLedger> qw1 = new QueryWrapper<>();
qw1.lambda().eq(EquipmentLedger::getCheckStatus, 1);
qw1.lambda().eq(EquipmentLedger::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setEquipmentLedgerAudit(equipmentLedgerService.list(qw1));
// Tool Inventory Record Service
QueryWrapper<ToolInventoryRecord> qw2 = new QueryWrapper<>();
qw2.lambda().eq(ToolInventoryRecord::getCheckStatus, 1);
qw2.lambda().eq(ToolInventoryRecord::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setToolInventoryRecordsAudit(toolInventoryRecordService.list(qw2));
// Operation Ticket Service
QueryWrapper<OperationTicket> qw3 = new QueryWrapper<>();
qw3.lambda().eq(OperationTicket::getReviewStatus, 1);
qw3.lambda().eq(OperationTicket::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setOperationTicketAudit(operationTicketService.list(qw3));
// Work Permit Service
QueryWrapper<WorkPermit> qw4 = new QueryWrapper<>();
qw4.lambda().eq(WorkPermit::getCheckStatus, 1);
qw4.lambda().eq(WorkPermit::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setWorkPermitAudit(workPermitService.list(qw4));
// Warehouse Service
QueryWrapper<Warehouse> qw5 = new QueryWrapper<>();
qw5.lambda().eq(Warehouse::getApprovalStatus, 1);
qw5.lambda().eq(Warehouse::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setWarehouseAudit(warehouseService.list(qw5));
// Manufacturer Info Service
QueryWrapper<ManufacturerInfo> qw6 = new QueryWrapper<>();
qw6.lambda().eq(ManufacturerInfo::getApprovalStatus, 1);
qw6.lambda().eq(ManufacturerInfo::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setManufacturerInfoAudit(manufacturerInfoService.list(qw6));
// Supplier Info Service
QueryWrapper<SupplierInfo> qw7 = new QueryWrapper<>();
qw7.lambda().eq(SupplierInfo::getApprovalStatus, 1);
qw7.lambda().eq(SupplierInfo::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setSupplierInfoAudit(supplierInfoService.list(qw7));
// Material Service
QueryWrapper<Material> qw8 = new QueryWrapper<>();
qw8.lambda().eq(Material::getIstatus, 1L);
qw8.lambda().eq(Material::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setMaterialAudit(materialService.list(qw8));
// Work Order Service (already implemented)
QueryWrapper<WorkOrder> qw9 = new QueryWrapper<>();
qw9.lambda().eq(WorkOrder::getApprovalStatus, 1);
qw9.lambda().eq(WorkOrder::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setWorkOrderAudit(workOrderService.list(qw9));
// Inspection Tasks Service
QueryWrapper<InspectionTasks> qw10 = new QueryWrapper<>();
qw10.lambda().eq(InspectionTasks::getTaskStatus, 1);
qw10.lambda().eq(InspectionTasks::getIsDeleted, DafConstant.DB_NOT_DELETED);
hp.setInspectionTasksAudit(inspectionTasksService.list(qw10));
// ProductionInformation Service
QueryWrapper<ProductionInformation> qw11 = new QueryWrapper<>();
qw11.lambda().eq(ProductionInformation::getCheckstatus, 2);
qw11.lambda().eq(ProductionInformation::getIsDeleted, DafConstant.DB_NOT_DELETED);
qw11.lambda().eq(ProductionInformation::getIsDiscontinue, 1);
hp.setProductionInformationAudit(productionInformationService.list(qw11));
return hp;
}
}

@ -0,0 +1,39 @@
package org.energy.modules.system.vo;
import lombok.Data;
import org.energy.modules.inspection.entity.InspectionTasks;
import org.energy.modules.leger.entity.EquipmentLedger;
import org.energy.modules.leger.entity.ToolInventoryRecord;
import org.energy.modules.release.entity.ProductionInformation;
import org.energy.modules.smart.entity.OperationTicket;
import org.energy.modules.smart.entity.WorkOrder;
import org.energy.modules.smart.entity.WorkPermit;
import org.energy.modules.spares.entity.ManufacturerInfo;
import org.energy.modules.spares.entity.Material;
import org.energy.modules.spares.entity.SupplierInfo;
import org.energy.modules.spares.entity.Warehouse;
import java.util.List;
@Data
public class HomePageVO {
// 巡检任务
private List<InspectionTasks> inspectionTasksAudit;
// 设备台账
private List<EquipmentLedger> equipmentLedgerAudit;
private List<ToolInventoryRecord> toolInventoryRecordsAudit;
// 智能两票
private List<OperationTicket> operationTicketAudit;
private List<WorkPermit> workPermitAudit;
// 备件管理
private List<Warehouse> warehouseAudit;
private List<ManufacturerInfo> manufacturerInfoAudit;
private List<SupplierInfo> supplierInfoAudit;
private List<Material> materialAudit;
// 工单
private List<WorkOrder> workOrderAudit;
// 生产信息发布
private List<ProductionInformation> productionInformationAudit;
}
Loading…
Cancel
Save