Merge remote-tracking branch 'origin/main'

main
yangzhicheng 1 year ago
commit 26a250fe9b
  1. 10
      src/main/java/org/energy/modules/inspection/controller/InspectionPlanController.java
  2. 10
      src/main/java/org/energy/modules/inspection/controller/InspectionRouteController.java
  3. 8
      src/main/java/org/energy/modules/inspection/controller/InspectionTasksController.java
  4. 13
      src/main/java/org/energy/modules/inspection/entity/InspectionObject.java
  5. 4
      src/main/java/org/energy/modules/inspection/excel/InspectionObjectExcel.java
  6. 4
      src/main/java/org/energy/modules/inspection/mapper/InspectionObjectMapper.xml
  7. 10
      src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.xml
  8. 10
      src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.xml
  9. 12
      src/main/java/org/energy/modules/inspection/mapper/InspectionTasksMapper.xml
  10. 31
      src/main/java/org/energy/modules/leger/controller/ToolInventoryRecordController.java
  11. 9
      src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.java
  12. 8
      src/main/java/org/energy/modules/leger/mapper/ToolInventoryRecordMapper.xml
  13. 9
      src/main/java/org/energy/modules/leger/service/IToolInventoryRecordService.java
  14. 1
      src/main/java/org/energy/modules/leger/service/impl/TechParametersServiceImpl.java
  15. 12
      src/main/java/org/energy/modules/leger/service/impl/ToolInventoryRecordServiceImpl.java
  16. 3
      src/main/java/org/energy/modules/smart/entity/WorkPermit.java
  17. 20
      src/main/java/org/energy/modules/spares/controller/WarehouseController.java
  18. 14
      src/main/java/org/energy/modules/spares/entity/ManufacturerInfo.java
  19. 9
      src/main/java/org/energy/modules/spares/entity/SupplierInfo.java
  20. 8
      src/main/java/org/energy/modules/spares/excel/ManufacturerInfoExcel.java
  21. 10
      src/main/java/org/energy/modules/spares/excel/SupplierInfoExcel.java
  22. 4
      src/main/java/org/energy/modules/spares/mapper/ManufacturerInfoMapper.xml
  23. 22
      src/main/java/org/energy/modules/spares/mapper/MaterialMapper.xml
  24. 4
      src/main/java/org/energy/modules/spares/mapper/SupplierInfoMapper.xml
  25. 17
      src/main/java/org/energy/modules/system/util/DataUtils.java

@ -141,7 +141,7 @@ public class InspectionPlanController extends DafController {
public R submit(@Valid @RequestBody InspectionPlan inspectionPlan) {
inspectionPlan.setPlanStatus(1);
String date = LocalDate.now().toString().replace("-","");
String maxNo = inspectionPlanService.getMaxNo("'%" + date + "%'");
String maxNo = inspectionPlanService.getMaxNo(date);
int number;
if (StringUtil.isNotEmpty(maxNo)){
number = Integer.parseInt(maxNo.substring(9));
@ -213,12 +213,6 @@ public class InspectionPlanController extends DafController {
@ApiLog
public void exportInspectionRoute(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) {
entity.remove("daf-auth");
entity.forEach((key, value) -> {
if (!"planStatus".equals(key))
{
entity.put(key, "%" + value + "%");
}
});
InspectionPlan vo = DataUtils.mapToEntity(entity, InspectionPlan::new);
List<InspectionPlanExcel> list = inspectionPlanService.export(vo);
response.setContentType("application/vnd.ms-excel");
@ -246,7 +240,7 @@ public class InspectionPlanController extends DafController {
@ApiOperationSupport(order = 12)
@ApiOperation(value = "获取路线信息", notes = "获取路线信息")
public R<InspectionPlan> getDetail(String planNo) {
InspectionPlan detail = inspectionPlanService.getDetail("'" + planNo + "'");
InspectionPlan detail = inspectionPlanService.getDetail(planNo);
return R.data(detail);
}
}

@ -141,7 +141,7 @@ public class InspectionRouteController extends DafController {
public R submit(@Valid @RequestBody InspectionRoute inspectionRoute) {
inspectionRoute.setIstatus(1);
String date = LocalDate.now().toString().replace("-","");
String maxNo = inspectionRouteService.getMaxNo("'%" + date + "%'");
String maxNo = inspectionRouteService.getMaxNo(date);
int number;
if (StringUtil.isNotEmpty(maxNo)){
number = Integer.parseInt(maxNo.substring(9));
@ -214,12 +214,6 @@ public class InspectionRouteController extends DafController {
@ApiLog
public void exportInspectionRoute(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) {
entity.remove("daf-auth");
entity.forEach((key, value) -> {
if (!"istatus".equals(key))
{
entity.put(key, "%" + value + "%");
}
});
InspectionRoute vo = DataUtils.mapToEntity(entity, InspectionRoute::new);
List<InspectionRouteExcel> list = inspectionRouteService.export(vo);
response.setContentType("application/vnd.ms-excel");
@ -247,7 +241,7 @@ public class InspectionRouteController extends DafController {
@ApiOperationSupport(order = 12)
@ApiOperation(value = "获取路线信息", notes = "获取路线信息")
public R<InspectionRoute> getDetailList(String routeNo) {
InspectionRoute DetailList = inspectionRouteService.getDetailList("'" + routeNo + "'");
InspectionRoute DetailList = inspectionRouteService.getDetailList(routeNo);
return R.data(DetailList);
}

@ -162,7 +162,7 @@ public class InspectionTasksController extends DafController {
public R submit(@Valid @RequestBody InspectionTasks inspectionTasks) {
inspectionTasks.setTaskStatus(1L);
String date = LocalDate.now().toString().replace("-","");
String maxTaskNo = inspectionTasksService.getMaxTaskNo("'%" + date + "%'");
String maxTaskNo = inspectionTasksService.getMaxTaskNo(date);
int number;
if (StringUtil.isNotEmpty(maxTaskNo)){
number = Integer.parseInt(maxTaskNo.substring(9));
@ -232,12 +232,6 @@ public class InspectionTasksController extends DafController {
@ApiLog
public void exportUser(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) {
entity.remove("daf-auth");
entity.forEach((key, value) -> {
if (!"station".equals(key) && !"taskStatus".equals(key))
{
entity.put(key, "%" + value + "%");
}
});
InspectionTasks vo = DataUtils.mapToEntity(entity, InspectionTasks::new);
List<InspectionTasksExcel> list = inspectionTasksService.export(vo);
response.setContentType("application/vnd.ms-excel");

@ -40,7 +40,7 @@ public class InspectionObject extends BaseEntity {
* 对象名称
*/
@ApiModelProperty(value = "对象名称")
private Integer objectName;
private String objectName;
/**
* 场站
*/
@ -61,11 +61,18 @@ public class InspectionObject extends BaseEntity {
*/
@ApiModelProperty(value = "对象区域")
private String objectArea;
/**
* KKS编号
*/
@ApiModelProperty(value = "KKS编号")
private String kksNo;
/**
* KKS编号
*/
@ApiModelProperty(value = "KKS编号")
private String kksNo;
@ApiModelProperty(value = "工器具编号")
private String toolsCodeId;
/**
* 取消原因
*/

@ -43,6 +43,10 @@ public class InspectionObjectExcel implements Serializable {
@ExcelProperty(value = "KKS编号")
private String kksNo;
@ColumnWidth(15)
@ExcelProperty(value = "工器具台账编码")
private String toolsCodeId;
@ColumnWidth(15)
@ExcelProperty(value = "取消原因")
private String cancelReason;

@ -18,6 +18,7 @@
<result column="object_type" property="objectType"/>
<result column="object_area" property="objectArea"/>
<result column="kks_no" property="kksNo"/>
<result column="tools_code_id" property="tools_code_id"/>
<result column="cancel_reason" property="cancelReason"/>
</resultMap>
@ -58,6 +59,7 @@
THEN '巡检对象02'
ELSE ''
END AS object_name_ext
, tools_code_id
FROM i_inspection_object ${ew.customSqlSegment}
</select>
@ -71,6 +73,6 @@
</select>
<select id="getDetailList" resultMap="inspectionObjectResultMap">
select object_name, object_type from i_inspection_object where object_no = ${object_no}
select object_name, object_type , station from i_inspection_object where object_no = ${object_no}
</select>
</mapper>

@ -35,13 +35,13 @@
LEFT JOIN sys_dict dic2 ON dic2.code = 'istatus' AND dic2.dict_key = a.plan_status AND dic2.is_deleted = '0'
WHERE a.is_deleted = 0
<if test="entity.planNo != null and entity.planNo != ''">
AND a.plan_no LIKE #{entity.planNo}
AND a.plan_no LIKE CONCAT('%', #{entity.planNo}, '%')
</if>
<if test="entity.planName != null and entity.planName != ''">
AND a.plan_name LIKE #{entity.planName}
AND a.plan_name LIKE CONCAT('%', #{entity.planName}, '%')
</if>
<if test="entity.periodType != null and entity.periodType != ''">
AND a.period_type LIKE #{entity.periodType}
AND a.period_type LIKE CONCAT('%', #{entity.periodType}, '%')
</if>
<if test="entity.planStatus != null and entity.planStatus != ''">
AND a.plan_status = #{entity.planStatus}
@ -54,11 +54,11 @@
<select id="getMaxNo" resultType="java.lang.String">
SELECT max(plan_no)
FROM i_inspection_plan where plan_no like ${date}
FROM i_inspection_plan where plan_no like CONCAT('%', #{date}, '%')
</select>
<select id="getDetail" resultMap="inspectionPlanResultMap">
select plan_name, plan_type from i_inspection_plan where plan_no = ${plan_no}
select plan_name, plan_type from i_inspection_plan where plan_no = #{plan_no}
</select>
</mapper>

@ -32,13 +32,13 @@
LEFT JOIN sys_dict dic2 ON dic2.code = 'istatus' AND dic2.dict_key = a.istatus AND dic2.is_deleted = '0'
WHERE a.is_deleted = 0
<if test="entity.routeNo != null and entity.routeNo != ''">
AND a.route_no LIKE #{entity.routeNo}
AND a.route_no LIKE CONCAT('%', #{entity.routeNo}, '%')
</if>
<if test="entity.routeName != null and entity.routeName != ''">
AND a.route_name LIKE #{entity.routeName}
AND a.route_name LIKE CONCAT('%', #{entity.routeName}, '%')
</if>
<if test="entity.type != null and entity.type != ''">
AND a.type LIKE #{entity.type}
AND a.type LIKE CONCAT('%', #{entity.type}, '%')
</if>
<if test="entity.istatus != null and entity.istatus != ''">
AND a.istatus = #{entity.istatus}
@ -51,11 +51,11 @@
<select id="getMaxNo" resultType="java.lang.String">
SELECT max(route_no)
FROM i_inspection_route where route_no like ${date}
FROM i_inspection_route where route_no like CONCAT('%', #{date}, '%')
</select>
<select id="getDetailList" resultMap="inspectionRouteResultMap">
select route_name, type from i_inspection_route where route_no = ${route_no}
select route_name, type from i_inspection_route where route_no = #{route_no}
</select>
</mapper>

@ -44,22 +44,22 @@
LEFT JOIN sys_dict dic2 ON dic2.code = 'task_status' AND dic2.dict_key = a.task_status AND dic2.is_deleted = '0'
WHERE a.is_deleted = 0
<if test="entity.taskNo != null and entity.taskNo != ''">
AND a.task_no LIKE #{entity.taskNo}
AND a.task_no LIKE CONCAT('%', #{entity.taskNo}, '%')
</if>
<if test="entity.taskName != null and entity.taskName != ''">
AND a.task_name LIKE #{entity.taskName}
AND a.task_name LIKE CONCAT('%', #{entity.taskName}, '%')
</if>
<if test="entity.station != null and entity.station != ''">
AND a.station = #{entity.station}
</if>
<if test="entity.taskStartDate != null and entity.taskStartDate != ''">
AND a.task_start_date LIKE #{entity.taskStartDate}
AND a.task_start_date LIKE CONCAT('%', #{entity.taskStartDate}, '%')
</if>
<if test="entity.taskEndDate != null and entity.taskEndDate != ''">
AND a.task_end_date LIKE #{entity.taskEndDate}
AND a.task_end_date LIKE CONCAT('%', #{entity.taskEndDate}, '%')
</if>
<if test="entity.responsiblePerson != null and entity.responsiblePerson != ''">
AND a.responsible_person LIKE #{entity.responsiblePerson}
AND a.responsible_person LIKE CONCAT('%', #{entity.responsiblePerson}, '%')
</if>
<if test="entity.taskStatus != null and entity.taskStatus != ''">
AND a.task_status = #{entity.taskStatus}
@ -68,7 +68,7 @@
<select id="getMaxTaskNO" resultType="java.lang.String">
SELECT max(task_no)
FROM i_inspection_tasks where task_no like ${date}
FROM i_inspection_tasks where task_no like CONCAT('%', #{date}, '%')
</select>
<select id="getListByToolsCodeId" resultMap="inspectionTasksResultMap">

@ -33,6 +33,7 @@ import com.dayu.daf.core.mp.support.Condition;
import com.dayu.daf.core.mp.support.Query;
import com.dayu.daf.core.tool.api.R;
import com.dayu.daf.core.tool.utils.Func;
import org.energy.modules.leger.entity.EquipmentLedger;
import org.energy.modules.leger.entity.TechParameters;
import org.energy.modules.leger.excel.ToolInventoryRecordExcel;
import org.energy.modules.leger.service.*;
@ -221,14 +222,26 @@ public class ToolInventoryRecordController extends DafController {
EasyExcel.write(response.getOutputStream(), ToolInventoryRecordExcel.class).sheet("工器具台账").doWrite(list);
}
// /**
// * 删除 检验标准一览
// */
// @GetMapping("/del")
// @ApiOperationSupport(order = 9)
// @ApiOperation(value = "逻辑删除", notes = "传入eqLedgerId")
// public R del(@ApiParam(value = "主键集合", required = true) @RequestParam Integer eqLedgerId) {
// return R.status(toolInventoryRecordService.delTechParameters(eqLedgerId));
// }
/**
* 获取对象编号
*/
@GetMapping("/getToolsCodeIdList")
@ApiOperationSupport(order = 11)
@ApiOperation(value = "获取工器具编码", notes = "获取工器具编码")
public R<List<ToolInventoryRecord>> getToolsCodeIdList() {
List<ToolInventoryRecord> kksList = toolInventoryRecordService.getToolsCodeIdList();
return R.data(kksList);
}
/**
* 获取对象编号
*/
@GetMapping("/getDetailList")
@ApiOperationSupport(order = 12)
@ApiOperation(value = "获取工器具信息", notes = "获取工器具信息")
public R<ToolInventoryRecord> getDetailList(String toolsCodeId) {
ToolInventoryRecord DetailList = toolInventoryRecordService.getDetailList("'" + toolsCodeId + "'");
return R.data(DetailList);
}
}

@ -30,4 +30,13 @@ public interface ToolInventoryRecordMapper extends BaseMapper<ToolInventoryRecor
List<ToolInventoryRecordExcel> exportData(@Param("ew") Wrapper<ToolInventoryRecord> queryWrapper);
/**
* 获取kks编号
*/
List<ToolInventoryRecord> getToolsCodeIdList();
/**
* 获取kks的信息
*/
ToolInventoryRecord getDetailList(String toolsCodeId);
}

@ -66,4 +66,12 @@
END AS check_status_ext
FROM l_tool_inventory_record ${ew.customSqlSegment}
</select>
<select id="getToolsCodeIdList" resultMap="toolInventoryRecordResultMap">
select tools_code_id from l_tool_inventory_record where is_deleted = 0 and check_status = 2
</select>
<select id="getDetailList" resultMap="toolInventoryRecordResultMap">
select ' ' as kks_encoding , stations from l_tool_inventory_record where tools_code_id = ${tools_code_id}
</select>
</mapper>

@ -36,4 +36,13 @@ public interface IToolInventoryRecordService extends BaseService<ToolInventoryRe
*/
List<ToolInventoryRecordExcel> export(Wrapper<ToolInventoryRecord> queryWrapper);
/**
* 获取路线编号
*/
List<ToolInventoryRecord> getToolsCodeIdList();
/**
* 获取路线的信息
*/
ToolInventoryRecord getDetailList(String toolsCodeId);
}

@ -26,4 +26,5 @@ public class TechParametersServiceImpl extends BaseServiceImpl<TechParametersMap
public boolean delTechParameters(Long eqLedgerId) {
return baseMapper.delTechParameters(eqLedgerId);
}
}

@ -34,4 +34,16 @@ public class ToolInventoryRecordServiceImpl extends BaseServiceImpl<ToolInventor
return list;
}
@Override
public List<ToolInventoryRecord> getToolsCodeIdList() {
List<ToolInventoryRecord> list = baseMapper.getToolsCodeIdList();
return list;
}
@Override
public ToolInventoryRecord getDetailList(String toolsCodeId) {
ToolInventoryRecord DetailList = baseMapper.getDetailList(toolsCodeId);
return DetailList;
}
}

@ -5,6 +5,7 @@ import com.dayu.daf.core.mp.base.BaseEntity;
import java.io.Serializable;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -126,6 +127,7 @@ public class WorkPermit extends BaseEntity {
/**
* 是否延期
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "是否延期")
private Integer isExtended;
/**
@ -141,6 +143,7 @@ public class WorkPermit extends BaseEntity {
/**
* 是否变更
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "是否变更")
private Integer ischanged;
/**

@ -140,6 +140,26 @@ public class WarehouseController extends DafController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入warehouse")
public R submit(@Valid @RequestBody Warehouse warehouse) {
if (warehouse.getId() == null) {
QueryWrapper<Warehouse> qw = new QueryWrapper<>();
qw.lambda().select(Warehouse::getCode)
.eq(Warehouse::getType, warehouse.getType())
.eq(Warehouse::getIsDeleted, DafConstant.DB_NOT_DELETED)
.orderByDesc(Warehouse::getCode)
.last("LIMIT 1");
String code = "";
Warehouse warehouseSelect = warehouseService.getOne(qw);
if (warehouseSelect != null) {
String maxCode = warehouseSelect.getCode();
if ("9999".equals(maxCode)) {
return R.fail("操作失败,编号已越位");
}
code = "CK" + warehouse.getType() + DataUtils.incrementLast(maxCode, 4);
} else {
code = "CK" + warehouse.getType() + "0001";
}
warehouse.setCode(code);
}
return R.status(warehouseService.saveOrUpdate(warehouse));
}

@ -65,12 +65,16 @@ public class ManufacturerInfo extends BaseEntity {
*/
@ApiModelProperty(value = "经营范围")
private String businessScope;
/**
* 执行标准
*/
/**
* 审核状态
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "执行标准")
@ApiModelProperty(value = "审核状态")
private Integer approvalStatus;
/**
* 执行标准
*/
@ApiModelProperty(value = "执行标准")
private String executiveStandards;
}

@ -66,10 +66,10 @@ public class SupplierInfo extends BaseEntity {
@ApiModelProperty(value = "经营范围")
private String businessScope;
/**
* 执行标准
* 审核状态
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "执行标准")
@ApiModelProperty(value = "审核状态")
private Integer approvalStatus;
/**
* 付款条约
@ -81,6 +81,11 @@ public class SupplierInfo extends BaseEntity {
*/
@ApiModelProperty(value = "价格条款")
private String priceTerms;
/**
* 执行标准
*/
@ApiModelProperty(value = "执行标准")
private String executiveStandards;
}

@ -85,6 +85,14 @@ public class ManufacturerInfoExcel implements Serializable {
@JsonSerialize(nullsUsing = NullSerializer.class)
@ColumnWidth(20)
@ExcelProperty(value = "执行标准")
private String executiveStandards;
/**
* 审核状态
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ColumnWidth(20)
@ExcelProperty(value = "审核状态")
private String approvalStatus;
}

@ -82,7 +82,7 @@ public class SupplierInfoExcel implements Serializable {
@JsonSerialize(nullsUsing = NullSerializer.class)
@ColumnWidth(20)
@ExcelProperty(value = "执行标准")
private String approvalStatus;
private String executiveStandards;
/**
* 付款条约
*/
@ -96,4 +96,12 @@ public class SupplierInfoExcel implements Serializable {
@ExcelProperty(value = "价格条款")
private String priceTerms;
/**
* 审核状态
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ColumnWidth(20)
@ExcelProperty(value = "审核状态")
private String approvalStatus;
}

@ -16,6 +16,7 @@
<result column="manufacturer_name" property="manufacturerName"/>
<result column="registered_address" property="registeredAddress"/>
<result column="production_address" property="productionAddress"/>
<result column="executive_standards" property="executiveStandards"/>
<result column="contact_number" property="contactNumber"/>
<result column="email" property="email"/>
<result column="business_scope" property="businessScope"/>
@ -36,7 +37,8 @@
a.contact_number,
a.email,
a.business_scope,
a.approval_status
a.approval_status,
a.executive_standards
from spt_manufacturer_info a
where a.is_deleted = 0
<if test="vo.creditCode != null and vo.creditCode != ''">

@ -38,18 +38,16 @@
</select>
<select id="getDetailList" resultType="org.energy.modules.spares.vo.MaterialVO">
select material_name, model
,b.name as warehouse_name
,inventory_count
from s_material
inner join (
select code
,name
from spt_warehouse
where code in (select warehouse from s_material where material_no = #{materialNo} and is_deleted = 0)
) as b
on b.code = s_material.warehouse
where material_no = #{materialNo} and is_deleted = 0
SELECT
a.material_name
, a.model
, b.name AS warehouse_name
, a.inventory_count
FROM s_material a
LEFT JOIN spt_warehouse b ON b.code = a.warehouse
WHERE
a.material_no = #{materialNo}
AND a.is_deleted = 0
</select>
<select id="exportData" resultType="org.energy.modules.spares.excel.MaterialExcel">

@ -19,6 +19,7 @@
<result column="contact_number" property="contactNumber"/>
<result column="email" property="email"/>
<result column="business_scope" property="businessScope"/>
<result column="executive_standards" property="executiveStandards"/>
<result column="approval_status" property="approvalStatus"/>
<result column="payment_terms" property="paymentTerms"/>
<result column="price_terms" property="priceTerms"/>
@ -39,7 +40,8 @@
a.business_scope,
a.approval_status,
a.payment_terms,
a.price_terms
a.price_terms,
a.executive_standards
from spt_supplier_info a
where a.is_deleted = 0
<if test="vo.creditCode != null and vo.creditCode != ''">

@ -68,4 +68,21 @@ public class DataUtils {
// Add more type conversions as needed
return value;
}
/**
* 将字符串末尾的latterIndex位数字加一并格式化成latterIndex位数
* @param str
* @return
*/
public static String incrementLast(String str, int latterIndex) {
// 获取字符串末尾的latterIndex位字符
String lastFour = str.substring(Math.max(0, str.length() - latterIndex));
// 将末尾字符转换为整数
int number = Integer.parseInt(lastFour);
// 整数加一
number++;
// 格式化整数为latterIndex位数的字符串
String result = String.format("%0" + latterIndex + "d", number);
return result;
}
}

Loading…
Cancel
Save