Merge remote-tracking branch 'origin/main'

main
zhen 12 months ago
commit 815370a3af
  1. 3
      src/main/java/org/energy/modules/leger/controller/EquipmentLedgerController.java
  2. 3
      src/main/java/org/energy/modules/leger/controller/ToolInventoryRecordController.java
  3. 3
      src/main/java/org/energy/modules/leger/entity/ToolInventoryRecord.java
  4. 7
      src/main/java/org/energy/modules/leger/mapper/DynamicledgerMapper.xml
  5. 23
      src/main/java/org/energy/modules/spares/controller/MaterialController.java

@ -208,8 +208,7 @@ public class EquipmentLedgerController extends DafController {
public R approve(Integer status, String ids) { public R approve(Integer status, String ids) {
List<EquipmentLedger> list = new ArrayList<>(); List<EquipmentLedger> list = new ArrayList<>();
for (String id : ids.split(",")) { for (String id : ids.split(",")) {
EquipmentLedger equipmentLedger = new EquipmentLedger(); EquipmentLedger equipmentLedger = equipmentLedgerService.getById(Long.parseLong(id));
equipmentLedger.setId(Long.parseLong(id));
equipmentLedger.setCheckStatus(status); equipmentLedger.setCheckStatus(status);
list.add(equipmentLedger); list.add(equipmentLedger);
} }

@ -198,8 +198,7 @@ public class ToolInventoryRecordController extends DafController {
public R approve(Integer status, String ids) { public R approve(Integer status, String ids) {
List<ToolInventoryRecord> list = new ArrayList<>(); List<ToolInventoryRecord> list = new ArrayList<>();
for (String id : ids.split(",")) { for (String id : ids.split(",")) {
ToolInventoryRecord toolInventoryRecord = new ToolInventoryRecord(); ToolInventoryRecord toolInventoryRecord = toolInventoryRecordService.getById(Long.parseLong(id));
toolInventoryRecord.setId(Long.parseLong(id));
toolInventoryRecord.setCheckStatus(status); toolInventoryRecord.setCheckStatus(status);
list.add(toolInventoryRecord); list.add(toolInventoryRecord);
} }

@ -1,5 +1,7 @@
package org.energy.modules.leger.entity; package org.energy.modules.leger.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.dayu.daf.core.mp.base.BaseEntity; import com.dayu.daf.core.mp.base.BaseEntity;
import java.io.Serializable; import java.io.Serializable;
@ -51,6 +53,7 @@ public class ToolInventoryRecord extends BaseEntity {
* 配置日期 * 配置日期
*/ */
@ApiModelProperty(value = "配置日期") @ApiModelProperty(value = "配置日期")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String configurationDate; private String configurationDate;
/** /**
* 责任班组 * 责任班组

@ -71,6 +71,7 @@
l_equipment_ledger aa l_equipment_ledger aa
left join smt_work_permit c left join smt_work_permit c
on aa.kks_encoding = c.kks_encoding on aa.kks_encoding = c.kks_encoding
and c.check_status = '2'
and c.is_deleted = '0' and c.is_deleted = '0'
<if test="entity.station != null and entity.station != ''"> <if test="entity.station != null and entity.station != ''">
and aa.station = #{entity.station} and aa.station = #{entity.station}
@ -98,6 +99,7 @@
left join smt_operation_ticket d left join smt_operation_ticket d
on aa.kks_encoding = d.kks_encoding on aa.kks_encoding = d.kks_encoding
and d.is_deleted = '0' and d.is_deleted = '0'
and d.review_status = '2'
<if test="entity.station != null and entity.station!= ''"> <if test="entity.station != null and entity.station!= ''">
and aa.station = #{entity.station} and aa.station = #{entity.station}
</if> </if>
@ -166,6 +168,7 @@
a.id = b.equipment_ledger_id a.id = b.equipment_ledger_id
and a.is_deleted = '0' and a.is_deleted = '0'
and b.is_deleted = '0' and b.is_deleted = '0'
and a.kks_encoding = #{entity.kksEncoding} and a.kks_encoding = #{entity.kksEncoding}
</select> </select>
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
@ -206,7 +209,7 @@
</resultMap> </resultMap>
<select id="getWorkticketListbyKksCd" resultMap="WorkticketResultMap"> <select id="getWorkticketListbyKksCd" resultMap="WorkticketResultMap">
select * from smt_work_permit where is_deleted = '0' select * from smt_work_permit where is_deleted = '0' and check_status = '2'
and kks_encoding = #{entity.kksEncoding} and kks_encoding = #{entity.kksEncoding}
</select> </select>
@ -248,7 +251,7 @@
<result column="review_status" property="reviewStatus"/> <result column="review_status" property="reviewStatus"/>
</resultMap> </resultMap>
<select id="getOperationListbyKksCd" resultMap="OperationResultMap"> <select id="getOperationListbyKksCd" resultMap="OperationResultMap">
select * from smt_operation_ticket where is_deleted = '0' select * from smt_operation_ticket where is_deleted = '0' and review_status = '2'
and kks_encoding = #{entity.kksEncoding} and kks_encoding = #{entity.kksEncoding}
</select> </select>

@ -37,7 +37,12 @@ import lombok.SneakyThrows;
import org.apache.commons.codec.Charsets; import org.apache.commons.codec.Charsets;
import org.energy.modules.inspection.entity.InspectionRoute; import org.energy.modules.inspection.entity.InspectionRoute;
import org.energy.modules.inspection.excel.InspectionRouteExcel; import org.energy.modules.inspection.excel.InspectionRouteExcel;
import org.energy.modules.leger.entity.EquipmentLedger;
import org.energy.modules.spares.entity.Inbound;
import org.energy.modules.spares.entity.Outbound;
import org.energy.modules.spares.excel.MaterialExcel; import org.energy.modules.spares.excel.MaterialExcel;
import org.energy.modules.spares.service.IInboundService;
import org.energy.modules.spares.service.IOutboundService;
import org.energy.modules.system.util.DataUtils; import org.energy.modules.system.util.DataUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@ -65,6 +70,8 @@ import java.util.Map;
public class MaterialController extends DafController { public class MaterialController extends DafController {
private IMaterialService materialService; private IMaterialService materialService;
private IInboundService inboundService;
private IOutboundService outboundService;
/** /**
* 详情 * 详情
@ -176,6 +183,22 @@ public class MaterialController extends DafController {
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
for (String id : ids.split(",")) {
// 获取物资编码
Material sel = new Material();
sel.setId(Long.parseLong(id));
Material material = materialService.getOne(Condition.getQueryWrapper(sel));
// 通过物资编码删除入库数据
QueryWrapper<Inbound> qw1 = new QueryWrapper<>();
qw1.lambda().eq(Inbound::getMaterialNo, material.getMaterialNo());
qw1.lambda().eq(Inbound::getIsDeleted, DafConstant.DB_NOT_DELETED);
inboundService.remove(qw1);
// 通过物资编码删除出库数据
QueryWrapper<Outbound> qw2 = new QueryWrapper<>();
qw2.lambda().eq(Outbound::getMaterialNo, material.getMaterialNo());
qw2.lambda().eq(Outbound::getIsDeleted, DafConstant.DB_NOT_DELETED);
outboundService.remove(qw2);
}
return R.status(materialService.deleteLogic(Func.toLongList(ids))); return R.status(materialService.deleteLogic(Func.toLongList(ids)));
} }

Loading…
Cancel
Save