1.修复设备领用养护功能的bug

zhairh
x_z 2 years ago
parent 9c52af8755
commit 49769b13e8

@ -69,4 +69,11 @@ public interface DeviceCollectOrderDetailDao {
* @param details
*/
void updateCodeBatch(List<DeviceCollectOrderDetailEntity> details);
/**
* code
*
* @param orderId
*/
void resetCode(@Param("orderId") String orderId);
}

@ -42,4 +42,9 @@ public class AddDeviceMAOrderRequest {
*
*/
private String remark;
/**
* ID
*/
private String collOrderId;
}

@ -134,6 +134,12 @@ public class DeviceCollectOrderServiceImpl implements DeviceCollectOrderService
String auditUser = customerService.getUserBean().getUserName();
deviceCollectOrderEntity.setAuditUser(auditUser);
deviceCollectOrderEntity.setStatus(status);
//驳回领用记录置空无序列号数据的序列号和code字段值
if (status == 0) {
deviceCollectOrderDetailDao.resetCode(deviceCollectOrderEntity.getOrderId());
}
deviceCollectOrderDao.updateByPrimaryKey(deviceCollectOrderEntity);
return ResultVOUtils.success("更新成功!");
}

@ -140,6 +140,7 @@ public class DeviceMAOrderServiceImpl implements DeviceMAOrderService {
deviceMAOrderEntity.setCreateTime(addDeviceMAOrderRequest.getCreateTime());
deviceMAOrderEntity.setUpdateTime(DateUtil.getDateTime());
deviceMAOrderEntity.setStatus(1);
deviceMAOrderEntity.setCollOrderId(addDeviceMAOrderRequest.getCollOrderId());
//查询领用详情表中此条码的数据
DeviceCollectOrderDetailEntity deviceCollectOrderDetail = deviceCollectOrderDetailDao.findOneByCode(addDeviceMAOrderRequest.getCode());

@ -174,6 +174,7 @@
AND dco.deptCode = #{deptCode}
</if>
</where>
order by dco.updateTime desc
</select>
<select id="selectOrderIdById" resultType="java.lang.String">

@ -407,4 +407,12 @@
where id = #{item.id}
</foreach>
</update>
<update id="resetCode">
update device_collect_order_detail
set code = null,
serialNo = null
where orderIdFk = #{orderId}
and code like '%#'
</update>
</mapper>

@ -278,6 +278,7 @@
from inv_product ip
left join basic_udirel bu on bu.id = ip.relIdFk
left join basic_products bp on bu.uuid = bp.uuid
where bu.id = #{productId}
where ip.relIdFk = #{productId}
group by ip.relIdFk
</select>
</mapper>
Loading…
Cancel
Save