Merge remote-tracking branch 'origin/ah-simple' into ah-simple
This commit is contained in:
commit
d460556a4e
|
|
@ -13,9 +13,7 @@ import com.bonus.material.order.domain.OrderInfoDto;
|
||||||
import com.bonus.material.order.service.OrderService;
|
import com.bonus.material.order.service.OrderService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -33,6 +31,7 @@ public class ComprehensiveController extends BaseController {
|
||||||
private DevInfoService devInfoService;
|
private DevInfoService devInfoService;
|
||||||
@Resource
|
@Resource
|
||||||
private OrderService orderService;
|
private OrderService orderService;
|
||||||
|
|
||||||
@ApiOperation(value = "综合查询-装备信息")
|
@ApiOperation(value = "综合查询-装备信息")
|
||||||
@GetMapping("/devList")
|
@GetMapping("/devList")
|
||||||
public AjaxResult getDevList(DevInfoVo devInfo) {
|
public AjaxResult getDevList(DevInfoVo devInfo) {
|
||||||
|
|
@ -44,6 +43,7 @@ public class ComprehensiveController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在租装备信息查询
|
* 在租装备信息查询
|
||||||
|
*
|
||||||
* @param devInfo
|
* @param devInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -64,6 +64,7 @@ public class ComprehensiveController extends BaseController {
|
||||||
List<RentDetailDto> list = orderService.getRentDetails(devInfo);
|
List<RentDetailDto> list = orderService.getRentDetails(devInfo);
|
||||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "综合查询-订单信息查询")
|
@ApiOperation(value = "综合查询-订单信息查询")
|
||||||
@GetMapping("/orderDetails")
|
@GetMapping("/orderDetails")
|
||||||
public AjaxResult getOrderDetails(OrderInfoDto orderInfoDto) {
|
public AjaxResult getOrderDetails(OrderInfoDto orderInfoDto) {
|
||||||
|
|
@ -72,4 +73,11 @@ public class ComprehensiveController extends BaseController {
|
||||||
List<OrderInfoDto> list = orderService.getOrderInfos(orderInfoDto);
|
List<OrderInfoDto> list = orderService.getOrderInfos(orderInfoDto);
|
||||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "订单确认")
|
||||||
|
@PostMapping("/orderConfirm/{orderId}")
|
||||||
|
public AjaxResult orderConfirm(@PathVariable String orderId) {
|
||||||
|
return orderService.orderConfirm(orderId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
package com.bonus.material.devchange.controller;
|
package com.bonus.material.devchange.controller;
|
||||||
|
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.contract.domain.BmContract;
|
import com.bonus.material.contract.domain.BmContract;
|
||||||
|
|
@ -18,21 +19,22 @@ import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备台账-总览表
|
* 设备台账-总览表
|
||||||
*
|
*
|
||||||
* @author xxxxx
|
* @author xxxxx
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/device")
|
@RequestMapping("/device")
|
||||||
public class MaDevInfoController extends BaseController{
|
public class MaDevInfoController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 服务对象
|
* 服务对象
|
||||||
*/
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private MaDevInfoService service;
|
private MaDevInfoService service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cha
|
* cha
|
||||||
|
*
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -43,40 +45,57 @@ public class MaDevInfoController extends BaseController{
|
||||||
startPage();
|
startPage();
|
||||||
List<MaDevInfo> list = service.list(o);
|
List<MaDevInfo> list = service.list(o);
|
||||||
return AjaxResult.success(getDataTable(list));
|
return AjaxResult.success(getDataTable(list));
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("报错啦",e);
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "设备台账-上下架")
|
@ApiOperation(value = "设备台账-上下架")
|
||||||
@PostMapping("/updateDeviceStatus")
|
@PostMapping("/updateDeviceStatus")
|
||||||
public AjaxResult updateDeviceStatus(@RequestBody DevMergeVo o){
|
public AjaxResult updateDeviceStatus(@RequestBody DevMergeVo o) {
|
||||||
try {
|
try {
|
||||||
Integer i = service.updateDeviceStatus(o);
|
Integer i = service.updateDeviceStatus(o);
|
||||||
if (i > 0){
|
if (i > 0) {
|
||||||
return AjaxResult.success("修改成功");
|
return AjaxResult.success("修改成功");
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error("修改失败");
|
return AjaxResult.error("修改失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("报错啦", e);
|
||||||
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}
|
||||||
logger.error("报错啦",e);
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "设备台账-修改")
|
||||||
|
@PostMapping("/updateDeviceApi")
|
||||||
|
public AjaxResult updateDeviceApi(@RequestBody MaDevInfo o) {
|
||||||
|
try {
|
||||||
|
Integer i = service.updateDeviceApi(o);
|
||||||
|
if (i > 0) {
|
||||||
|
return AjaxResult.success("修改成功");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("修改失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "设备台账-删除")
|
@ApiOperation(value = "设备台账-删除")
|
||||||
@PostMapping("/delDevice")
|
@PostMapping("/delDevice/{ids}")
|
||||||
public AjaxResult delDevice(String ids){
|
public AjaxResult delDevice(@PathVariable("ids") String[] ids) {
|
||||||
try {
|
try {
|
||||||
Integer i = service.delDevice(ids);
|
Integer i = service.delDevice(ids);
|
||||||
if (i > 0){
|
if (i > 0) {
|
||||||
return AjaxResult.success("修改成功");
|
return AjaxResult.success("修改成功");
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error("修改失败");
|
return AjaxResult.error("修改失败");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("报错啦",e);
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -84,48 +103,48 @@ public class MaDevInfoController extends BaseController{
|
||||||
|
|
||||||
@ApiOperation(value = "设备类型树")
|
@ApiOperation(value = "设备类型树")
|
||||||
@PostMapping("/deviceTree")
|
@PostMapping("/deviceTree")
|
||||||
public AjaxResult deviceTree(String id){
|
public AjaxResult deviceTree(String id) {
|
||||||
try {
|
try {
|
||||||
DeviceTreeBean list = service.deviceTree(id);
|
DeviceTreeBean list = service.deviceTree(id);
|
||||||
return AjaxResult.success("修改成功", list);
|
return AjaxResult.success("修改成功", list);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("报错啦",e);
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "设备统计数据")
|
@ApiOperation(value = "设备统计数据")
|
||||||
@PostMapping("/deviceCount")
|
@PostMapping("/deviceCount")
|
||||||
public AjaxResult deviceCount(@RequestBody MaDevInfo o){
|
public AjaxResult deviceCount(@RequestBody MaDevInfo o) {
|
||||||
try {
|
try {
|
||||||
DeviceCountBean list = service.deviceCount(o);
|
DeviceCountBean list = service.deviceCount(o);
|
||||||
return AjaxResult.success("修改成功", list);
|
return AjaxResult.success("修改成功", list);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("报错啦",e);
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "设备范围-所在地")
|
@ApiOperation(value = "设备范围-所在地")
|
||||||
@PostMapping("/deviceLocationSel")
|
@PostMapping("/deviceLocationSel")
|
||||||
public AjaxResult deviceLocationSel(String id){
|
public AjaxResult deviceLocationSel(String id) {
|
||||||
try {
|
try {
|
||||||
List<MapBean> list = service.deviceLocationSel(id);
|
List<MapBean> list = service.deviceLocationSel(id);
|
||||||
return AjaxResult.success("修改成功", list);
|
return AjaxResult.success("修改成功", list);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("报错啦",e);
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "公司-地市公司")
|
@ApiOperation(value = "公司-地市公司")
|
||||||
@PostMapping("/companySel")
|
@PostMapping("/companySel")
|
||||||
public AjaxResult companySel(String id){
|
public AjaxResult companySel(String id) {
|
||||||
try {
|
try {
|
||||||
List<MapBean> list = service.companySel(id);
|
List<MapBean> list = service.companySel(id);
|
||||||
return AjaxResult.success("修改成功", list);
|
return AjaxResult.success("修改成功", list);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.error("报错啦",e);
|
logger.error("报错啦", e);
|
||||||
return AjaxResult.error("调用异常,请联系管理员");
|
return AjaxResult.error("调用异常,请联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,4 +53,6 @@ public class CsDeviceChangeDetailsVo {
|
||||||
* 维修内容
|
* 维修内容
|
||||||
*/
|
*/
|
||||||
private String repairContent;
|
private String repairContent;
|
||||||
|
|
||||||
|
private String status;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,223 +17,223 @@ import lombok.NoArgsConstructor;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class MaDevInfo {
|
public class MaDevInfo {
|
||||||
/**
|
/**
|
||||||
* 设备id
|
* 设备id
|
||||||
*/
|
*/
|
||||||
private Integer maId;
|
private Integer maId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备名称
|
* 装备名称
|
||||||
*/
|
*/
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备整机重量
|
* 装备整机重量
|
||||||
*/
|
*/
|
||||||
private Double deviceWeight;
|
private Double deviceWeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备数量
|
* 设备数量
|
||||||
*/
|
*/
|
||||||
private Double deviceCount;
|
private Double deviceCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备编号
|
* 装备编号
|
||||||
*/
|
*/
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 唯一标识符(如车架号等)
|
* 唯一标识符(如车架号等)
|
||||||
*/
|
*/
|
||||||
private String identifyCode;
|
private String identifyCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型id
|
* 类型id
|
||||||
*/
|
*/
|
||||||
private Integer typeId;
|
private Integer typeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备状态(0:草稿 1:下架 2:上架 3:在租 4:自有)考虑数据字典
|
* 设备状态(0:草稿 1:下架 2:上架 3:在租 4:自有)考虑数据字典
|
||||||
*/
|
*/
|
||||||
private String maStatus;
|
private String maStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租赁范围
|
* 租赁范围
|
||||||
*/
|
*/
|
||||||
private Integer leaseScope;
|
private Integer leaseScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所在地
|
* 设备所在地
|
||||||
*/
|
*/
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备品牌
|
* 装备品牌
|
||||||
*/
|
*/
|
||||||
private String brand;
|
private String brand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备型号(分类四级名称,新增可不添加)
|
* 装备型号(分类四级名称,新增可不添加)
|
||||||
*/
|
*/
|
||||||
private String modelName;
|
private String modelName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出厂日期
|
* 出厂日期
|
||||||
*/
|
*/
|
||||||
private String productionDate;
|
private String productionDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备使用年限
|
* 设备使用年限
|
||||||
*/
|
*/
|
||||||
private String workingHours;
|
private String workingHours;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整机序列号
|
* 整机序列号
|
||||||
*/
|
*/
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备月租价
|
* 设备月租价
|
||||||
*/
|
*/
|
||||||
private BigDecimal monthLeasePrice;
|
private BigDecimal monthLeasePrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备天租价
|
* 设备天租价
|
||||||
*/
|
*/
|
||||||
private BigDecimal dayLeasePrice;
|
private BigDecimal dayLeasePrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备主照片
|
* 设备主照片
|
||||||
*/
|
*/
|
||||||
private String picUrl;
|
private String picUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机手月租金
|
* 机手月租金
|
||||||
*/
|
*/
|
||||||
private BigDecimal jsMonthPrice;
|
private BigDecimal jsMonthPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机手天租金
|
* 机手天租金
|
||||||
*/
|
*/
|
||||||
private BigDecimal jsDayPrice;
|
private BigDecimal jsDayPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 详细描述
|
* 详细描述
|
||||||
*/
|
*/
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gps编号
|
* gps编号
|
||||||
*/
|
*/
|
||||||
private String gpsCode;
|
private String gpsCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所属公司
|
* 设备所属公司
|
||||||
*/
|
*/
|
||||||
private Integer ownCo;
|
private Integer ownCo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 联系人
|
* 联系人
|
||||||
*/
|
*/
|
||||||
private String person;
|
private String person;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 联系电话
|
* 联系电话
|
||||||
*/
|
*/
|
||||||
private String personPhone;
|
private String personPhone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
private Integer creator;
|
private Integer creator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订金
|
* 订金
|
||||||
*/
|
*/
|
||||||
private BigDecimal deposit;
|
private BigDecimal deposit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否删除(0 是, 1否)
|
* 是否删除(0 是, 1否)
|
||||||
*/
|
*/
|
||||||
private String isActive;
|
private String isActive;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时间
|
* 修改时间
|
||||||
*/
|
*/
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改人
|
* 修改人
|
||||||
*/
|
*/
|
||||||
private Integer updateBy;
|
private Integer updateBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否配置机手
|
* 是否配置机手
|
||||||
*/
|
*/
|
||||||
private String isOperator;
|
private String isOperator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备规格
|
* 设备规格
|
||||||
*/
|
*/
|
||||||
private String specification;
|
private String specification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所在省id
|
* 设备所在省id
|
||||||
*/
|
*/
|
||||||
private Integer provinceId;
|
private Integer provinceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所在市id
|
* 设备所在市id
|
||||||
*/
|
*/
|
||||||
private Integer cityId;
|
private Integer cityId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所在区id
|
* 设备所在区id
|
||||||
*/
|
*/
|
||||||
private Integer areaId;
|
private Integer areaId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备视频URL
|
* 设备视频URL
|
||||||
*/
|
*/
|
||||||
private String videoUrl;
|
private String videoUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传人id
|
* 上传人id
|
||||||
*/
|
*/
|
||||||
private Integer ownId;
|
private Integer ownId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验日期
|
* 校验日期
|
||||||
*/
|
*/
|
||||||
private Date checkDate;
|
private Date checkDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验周期
|
* 检验周期
|
||||||
*/
|
*/
|
||||||
private Integer checkCycle;
|
private Integer checkCycle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否上传质检证书(0:否 1:是)
|
* 是否上传质检证书(0:否 1:是)
|
||||||
*/
|
*/
|
||||||
private Integer isQc;
|
private Integer isQc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否上传安全证书(0:否 1:是)
|
* 是否上传安全证书(0:否 1:是)
|
||||||
*/
|
*/
|
||||||
private Integer isSafeBook;
|
private Integer isSafeBook;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否上架专区 0:否 1:是
|
* 是否上架专区 0:否 1:是
|
||||||
*/
|
*/
|
||||||
private Boolean isZone;
|
private Boolean isZone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专区id
|
* 专区id
|
||||||
*/
|
*/
|
||||||
private Integer zoneId;
|
private Integer zoneId;
|
||||||
|
|
||||||
private Integer totalUpDay;
|
private Integer totalUpDay;
|
||||||
|
|
@ -243,43 +243,43 @@ public class MaDevInfo {
|
||||||
private String originaValue;
|
private String originaValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认 1 变更状态 变更类型 1入库 2、3 出库(2是自用3共享) 3 4 退役 4 维修
|
* 默认 1 变更状态 变更类型 1入库 2、3 出库(2是自用3共享) 3 4 退役 4 维修
|
||||||
*/
|
*/
|
||||||
private String changeStatus;
|
private String changeStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准使用到期时间(和出粗和那个日期做对比)
|
* 标准使用到期时间(和出粗和那个日期做对比)
|
||||||
*/
|
*/
|
||||||
private Date expirationTime;
|
private Date expirationTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备录入状态 0待审核 1审核通过 2审核驳回
|
* 设备录入状态 0待审核 1审核通过 2审核驳回
|
||||||
*/
|
*/
|
||||||
private String entryStatus;
|
private String entryStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否上下架 1上架 0下架
|
* 是否上下架 1上架 0下架
|
||||||
*/
|
*/
|
||||||
private String upDownStatus;
|
private String upDownStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 特征值json
|
* 特征值json
|
||||||
*/
|
*/
|
||||||
private String jsonData;
|
private String jsonData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备原值
|
* 设备原值
|
||||||
*/
|
*/
|
||||||
private BigDecimal buyPrice;
|
private BigDecimal buyPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备类型名称--录入数据用
|
* 装备类型名称--录入数据用
|
||||||
*/
|
*/
|
||||||
private String itemTypeModel;
|
private String itemTypeModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所在项目
|
* 所在项目
|
||||||
*/
|
*/
|
||||||
private String onProject;
|
private String onProject;
|
||||||
|
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
@ -314,4 +314,6 @@ public class MaDevInfo {
|
||||||
|
|
||||||
private String isWarn;
|
private String isWarn;
|
||||||
|
|
||||||
|
private String proName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import java.util.List;
|
||||||
public interface MaDevInfoMapper {
|
public interface MaDevInfoMapper {
|
||||||
/**
|
/**
|
||||||
* select by primary key
|
* select by primary key
|
||||||
|
*
|
||||||
* @param o primary key
|
* @param o primary key
|
||||||
* @return object by primary key
|
* @return object by primary key
|
||||||
*/
|
*/
|
||||||
|
|
@ -21,7 +22,7 @@ public interface MaDevInfoMapper {
|
||||||
|
|
||||||
Integer updateDeviceStatus(List<MapBean> list);
|
Integer updateDeviceStatus(List<MapBean> list);
|
||||||
|
|
||||||
Integer delDevice(List<String> list);
|
Integer delDevice(String[] list);
|
||||||
|
|
||||||
List<DeviceTreeBean> deviceTree(String id);
|
List<DeviceTreeBean> deviceTree(String id);
|
||||||
|
|
||||||
|
|
@ -32,4 +33,12 @@ public interface MaDevInfoMapper {
|
||||||
List<MapBean> deviceLocationSel(String id);
|
List<MapBean> deviceLocationSel(String id);
|
||||||
|
|
||||||
List<MapBean> companySel(@Param("id") String id);
|
List<MapBean> companySel(@Param("id") String id);
|
||||||
|
|
||||||
|
Integer updateDeviceApi(MaDevInfo o);
|
||||||
|
|
||||||
|
void delProperties(MaDevInfo item);
|
||||||
|
|
||||||
|
void insertDevInfoProperties(@Param("list") List<DevInfoPropertyVo> item, @Param("maId") Integer maId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ public class DevChangeServiceImpl implements DevChangeService {
|
||||||
int num=mapper.addChangeInfo(vo);
|
int num=mapper.addChangeInfo(vo);
|
||||||
if(num>0){
|
if(num>0){
|
||||||
for (CsDeviceChangeDetailsVo deviceChangeDetailsVo:list){
|
for (CsDeviceChangeDetailsVo deviceChangeDetailsVo:list){
|
||||||
if("1".equals(vo.getStatus())){
|
if("1".equals(deviceChangeDetailsVo.getStatus())){
|
||||||
updateDevDetails2(deviceChangeDetailsVo.getDevId(),proId,"1",deviceChangeDetailsVo.getNum());
|
updateDevDetails2(deviceChangeDetailsVo.getDevId(),proId,"1",deviceChangeDetailsVo.getNum());
|
||||||
}else{
|
}else{
|
||||||
updateDevDetails2(deviceChangeDetailsVo.getDevId(),proId,"4",deviceChangeDetailsVo.getNum());
|
updateDevDetails2(deviceChangeDetailsVo.getDevId(),proId,"4",deviceChangeDetailsVo.getNum());
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public interface MaDevInfoService{
|
||||||
|
|
||||||
Integer updateDeviceStatus(DevMergeVo o);
|
Integer updateDeviceStatus(DevMergeVo o);
|
||||||
|
|
||||||
Integer delDevice(String ids);
|
Integer delDevice(String[] ids);
|
||||||
|
|
||||||
DeviceTreeBean deviceTree(String id);
|
DeviceTreeBean deviceTree(String id);
|
||||||
|
|
||||||
|
|
@ -23,4 +23,6 @@ public interface MaDevInfoService{
|
||||||
List<MapBean> deviceLocationSel(String id);
|
List<MapBean> deviceLocationSel(String id);
|
||||||
|
|
||||||
List<MapBean> companySel(String id);
|
List<MapBean> companySel(String id);
|
||||||
|
|
||||||
|
Integer updateDeviceApi(MaDevInfo o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.material.devchange.service;
|
package com.bonus.material.devchange.service;
|
||||||
|
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.material.devchange.domain.DeviceCountBean;
|
import com.bonus.material.devchange.domain.DeviceCountBean;
|
||||||
import com.bonus.material.devchange.domain.DeviceTreeBean;
|
import com.bonus.material.devchange.domain.DeviceTreeBean;
|
||||||
import com.bonus.material.devchange.domain.MapBean;
|
import com.bonus.material.devchange.domain.MapBean;
|
||||||
|
|
@ -13,11 +14,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import com.bonus.material.devchange.domain.MaDevInfo;
|
import com.bonus.material.devchange.domain.MaDevInfo;
|
||||||
|
|
||||||
|
import java.security.Security;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class MaDevInfoServiceImpl implements MaDevInfoService{
|
public class MaDevInfoServiceImpl implements MaDevInfoService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MaDevInfoMapper mapper;
|
private MaDevInfoMapper mapper;
|
||||||
|
|
@ -25,10 +27,12 @@ public class MaDevInfoServiceImpl implements MaDevInfoService{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MaDevInfo> list(MaDevInfo o) {
|
public List<MaDevInfo> list(MaDevInfo o) {
|
||||||
|
Long thisLoginUserDeptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
|
o.setOwnCo(Math.toIntExact(thisLoginUserDeptId));
|
||||||
List<MaDevInfo> list = mapper.list(o);
|
List<MaDevInfo> list = mapper.list(o);
|
||||||
list.forEach(item ->{
|
list.forEach(item -> {
|
||||||
List<DevInfoPropertyVo> propertiiesList = mapper.getProperties(item);
|
List<DevInfoPropertyVo> propertiiesList = mapper.getProperties(item);
|
||||||
if(propertiiesList!=null && !propertiiesList.isEmpty()){
|
if (propertiiesList != null && !propertiiesList.isEmpty()) {
|
||||||
// String json= JSON.toJSONString(devInfoPropertyVos);
|
// String json= JSON.toJSONString(devInfoPropertyVos);
|
||||||
// vo.setJsonData(json);
|
// vo.setJsonData(json);
|
||||||
// mapper.updateJson(vo);
|
// mapper.updateJson(vo);
|
||||||
|
|
@ -41,26 +45,20 @@ public class MaDevInfoServiceImpl implements MaDevInfoService{
|
||||||
@Override
|
@Override
|
||||||
public Integer updateDeviceStatus(DevMergeVo o) {
|
public Integer updateDeviceStatus(DevMergeVo o) {
|
||||||
String[] split = o.getDevIds().split(",");
|
String[] split = o.getDevIds().split(",");
|
||||||
if(split.length>0){
|
if (split.length > 0) {
|
||||||
List<MapBean> list = new ArrayList<>();
|
List<MapBean> list = new ArrayList<>();
|
||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
list.add(new MapBean(s,o.getStatus()));
|
list.add(new MapBean(s, o.getStatus()));
|
||||||
}
|
}
|
||||||
return mapper.updateDeviceStatus(list);
|
return mapper.updateDeviceStatus(list);
|
||||||
}else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer delDevice(String ids) {
|
public Integer delDevice(String[] ids) {
|
||||||
String[] split = ids.split(",");
|
return mapper.delDevice(ids);
|
||||||
if(split.length>0){
|
|
||||||
List<String> list = Arrays.asList(split);
|
|
||||||
return mapper.delDevice(list);
|
|
||||||
}else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -84,6 +82,17 @@ public class MaDevInfoServiceImpl implements MaDevInfoService{
|
||||||
return mapper.companySel(id);
|
return mapper.companySel(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param o
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Integer updateDeviceApi(MaDevInfo o) {
|
||||||
|
mapper.delProperties(o);
|
||||||
|
mapper.insertDevInfoProperties(o.getPropertyVoList(), o.getMaId());
|
||||||
|
return mapper.updateDeviceApi(o);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将扁平列表构建成树,并添加一个总的根节点
|
* 将扁平列表构建成树,并添加一个总的根节点
|
||||||
*/
|
*/
|
||||||
|
|
@ -116,7 +125,7 @@ public class MaDevInfoServiceImpl implements MaDevInfoService{
|
||||||
// 如果父节点不存在,挂到虚拟根
|
// 如果父节点不存在,挂到虚拟根
|
||||||
parentNode = virtualRoot;
|
parentNode = virtualRoot;
|
||||||
}
|
}
|
||||||
if(StringUtils.isEmpty(parentNode.getChildren())){
|
if (StringUtils.isEmpty(parentNode.getChildren())) {
|
||||||
parentNode.setChildren(new ArrayList<>());
|
parentNode.setChildren(new ArrayList<>());
|
||||||
}
|
}
|
||||||
parentNode.getChildren().add(node);
|
parentNode.getChildren().add(node);
|
||||||
|
|
@ -124,7 +133,7 @@ public class MaDevInfoServiceImpl implements MaDevInfoService{
|
||||||
// 5. 创建最终的总根节点
|
// 5. 创建最终的总根节点
|
||||||
DeviceTreeBean root = new DeviceTreeBean("0", "-1", "设备目录");
|
DeviceTreeBean root = new DeviceTreeBean("0", "-1", "设备目录");
|
||||||
if (virtualRoot.getChildren() != null && !virtualRoot.getChildren().isEmpty()) {
|
if (virtualRoot.getChildren() != null && !virtualRoot.getChildren().isEmpty()) {
|
||||||
if(StringUtils.isEmpty(root.getChildren())){
|
if (StringUtils.isEmpty(root.getChildren())) {
|
||||||
root.setChildren(new ArrayList<>());
|
root.setChildren(new ArrayList<>());
|
||||||
}
|
}
|
||||||
root.getChildren().addAll(virtualRoot.getChildren());
|
root.getChildren().addAll(virtualRoot.getChildren());
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.material.order.mapper;
|
package com.bonus.material.order.mapper;
|
||||||
|
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.comprehensive.entity.RentDetailDto;
|
import com.bonus.material.comprehensive.entity.RentDetailDto;
|
||||||
import com.bonus.material.device.domain.DevInfo;
|
import com.bonus.material.device.domain.DevInfo;
|
||||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||||
|
|
@ -66,4 +67,6 @@ public interface OrderMapper {
|
||||||
OrderDto getOrderCount();
|
OrderDto getOrderCount();
|
||||||
|
|
||||||
List<OrderData> getBuyerAndSellerCouples();
|
List<OrderData> getBuyerAndSellerCouples();
|
||||||
|
|
||||||
|
Integer orderConfirm(String orderId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,6 @@ public interface OrderService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int getOrderCode(OrderDetailDto dto);
|
int getOrderCode(OrderDetailDto dto);
|
||||||
|
|
||||||
|
AjaxResult orderConfirm(String orderId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import com.bonus.common.core.utils.DateUtils;
|
||||||
import com.bonus.common.core.utils.SpringUtils;
|
import com.bonus.common.core.utils.SpringUtils;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.redis.service.RedisService;
|
import com.bonus.common.redis.service.RedisService;
|
||||||
import com.bonus.common.security.service.SmsService;
|
import com.bonus.common.security.service.SmsService;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
|
@ -40,6 +41,7 @@ import com.bonus.material.task.mapper.TmTaskMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
|
|
@ -92,7 +94,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
for (OrderInfoDto orderInfoDto : orderInfoDtos) {
|
for (OrderInfoDto orderInfoDto : orderInfoDtos) {
|
||||||
// 首先判断库存是否足够
|
// 首先判断库存是否足够
|
||||||
List<OrderDetailDto> orderDetailDtos = orderInfoDto.getDetailsList();
|
List<OrderDetailDto> orderDetailDtos = orderInfoDto.getDetailsList();
|
||||||
if(orderDetailDtos == null){
|
if (orderDetailDtos == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// orderDetailDtos.removeIf(Objects::isNull);
|
// orderDetailDtos.removeIf(Objects::isNull);
|
||||||
|
|
@ -290,6 +292,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算两个日期之间的天数差
|
* 计算两个日期之间的天数差
|
||||||
|
*
|
||||||
* @param preOutboundTimeStr
|
* @param preOutboundTimeStr
|
||||||
* @param rentEndTime
|
* @param rentEndTime
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -320,6 +323,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将 java.util.Date 转换为 java.time.LocalDate
|
* 将 java.util.Date 转换为 java.time.LocalDate
|
||||||
|
*
|
||||||
* @param date
|
* @param date
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -367,7 +371,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
// 针对于收货操作,校验6位数取件码是否正确
|
// 针对于收货操作,校验6位数取件码是否正确
|
||||||
if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString())) {
|
if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString())) {
|
||||||
if (StringUtils.isBlank(orderInfoDto.getPickupCode())){
|
if (StringUtils.isBlank(orderInfoDto.getPickupCode())) {
|
||||||
throw new ServiceException("取件码不能为空");
|
throw new ServiceException("取件码不能为空");
|
||||||
}
|
}
|
||||||
// 查看存储redis中的取件码,和前端传的取件码做对比
|
// 查看存储redis中的取件码,和前端传的取件码做对比
|
||||||
|
|
@ -444,16 +448,14 @@ public class OrderServiceImpl implements OrderService {
|
||||||
tmTask.setTaskStatus(minOrderStatus.getAsInt());
|
tmTask.setTaskStatus(minOrderStatus.getAsInt());
|
||||||
tmTask.setCode(dtos.get(0).getOrderCode());
|
tmTask.setCode(dtos.get(0).getOrderCode());
|
||||||
if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_PENDING_SHIPMENT.getStatus().toString()) ||
|
if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_PENDING_SHIPMENT.getStatus().toString()) ||
|
||||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_TERMINATED.getStatus().toString()))
|
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_TERMINATED.getStatus().toString())) {
|
||||||
{
|
|
||||||
tmTask.setNoticeCompanyId(tmTask.getBuyerCompanyId());
|
tmTask.setNoticeCompanyId(tmTask.getBuyerCompanyId());
|
||||||
// sendMsgToSms(Arrays.asList(dtos.get(0).getBuyerPhoneNumber()), dtos.get(0).getOrderCode() + "订单已接单,请注意查收。");
|
// sendMsgToSms(Arrays.asList(dtos.get(0).getBuyerPhoneNumber()), dtos.get(0).getOrderCode() + "订单已接单,请注意查收。");
|
||||||
|
|
||||||
} else if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_RECEIVE.getStatus().toString()) ||
|
} else if (orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_RECEIVE.getStatus().toString()) ||
|
||||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString()) ||
|
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString()) ||
|
||||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_UNDER_LEASE.getStatus().toString()) ||
|
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_UNDER_LEASE.getStatus().toString()) ||
|
||||||
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_REPAIRED.getStatus().toString()))
|
orderInfoDto.getOrderStatus().equals(OrderStatusEnum.ORDER_REPAIRED.getStatus().toString())) {
|
||||||
{
|
|
||||||
tmTask.setNoticeCompanyId(tmTask.getSellerCompanyId());
|
tmTask.setNoticeCompanyId(tmTask.getSellerCompanyId());
|
||||||
// sendMsgToSms(Arrays.asList(dtos.get(0).getBuyerPhoneNumber()), dtos.get(0).getOrderCode() + "订单已接单,请注意查收。");
|
// sendMsgToSms(Arrays.asList(dtos.get(0).getBuyerPhoneNumber()), dtos.get(0).getOrderCode() + "订单已接单,请注意查收。");
|
||||||
}
|
}
|
||||||
|
|
@ -483,7 +485,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
bmMessage.setToCompany(Long.valueOf(dto.getSellerCompany()));
|
bmMessage.setToCompany(Long.valueOf(dto.getSellerCompany()));
|
||||||
} else if (OrderStatusEnum.ORDER_RECEIVE.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_PENDING_SHIPMENT.getStatus().toString().equals(orderInfoDto.getOrderStatus())
|
} else if (OrderStatusEnum.ORDER_RECEIVE.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_PENDING_SHIPMENT.getStatus().toString().equals(orderInfoDto.getOrderStatus())
|
||||||
|| OrderStatusEnum.ORDER_REPAIRED.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_TERMINATED.getStatus().toString().equals(orderInfoDto.getOrderStatus())) {
|
|| OrderStatusEnum.ORDER_REPAIRED.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_TERMINATED.getStatus().toString().equals(orderInfoDto.getOrderStatus())) {
|
||||||
// 已接单、已出库、已检修、已结算 通知承租方
|
// 已接单、已出库、已检修、已结算 通知承租方
|
||||||
bmMessage.setToCompany(Long.valueOf(dto.getBuyerCompany()));
|
bmMessage.setToCompany(Long.valueOf(dto.getBuyerCompany()));
|
||||||
}
|
}
|
||||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
||||||
|
|
@ -507,7 +509,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
* 发送消息到短信
|
* 发送消息到短信
|
||||||
*
|
*
|
||||||
* @param phoneNumbers 电话号码列表,可能包含无效或重复的号码
|
* @param phoneNumbers 电话号码列表,可能包含无效或重复的号码
|
||||||
* @param msg 要发送的短信消息内容
|
* @param msg 要发送的短信消息内容
|
||||||
* @return 发送短信的结果,具体形式依赖于SmsUtils.smsToken的实现
|
* @return 发送短信的结果,具体形式依赖于SmsUtils.smsToken的实现
|
||||||
* 此方法首先检查电话号码列表是否为空,如果为空,则直接返回空字符串。
|
* 此方法首先检查电话号码列表是否为空,如果为空,则直接返回空字符串。
|
||||||
* 接下来,它会移除列表中所有为空的电话号码,
|
* 接下来,它会移除列表中所有为空的电话号码,
|
||||||
|
|
@ -685,6 +687,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取单个订单取件码
|
* 获取单个订单取件码
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -699,4 +702,18 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
return Integer.parseInt(cacheObject.toString());
|
return Integer.parseInt(cacheObject.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param orderId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult orderConfirm(String orderId) {
|
||||||
|
try {
|
||||||
|
Integer i = orderMapper.orderConfirm(orderId);
|
||||||
|
return i > 0 ? AjaxResult.success("操作成功") : AjaxResult.error("操作失败");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error("操作成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mdq.next_check_time nextDate,mt.typeId, mt.unit_name unit,mt.maintenance_alarm_day ,
|
mdq.next_check_time nextDate,mt.typeId, mt.unit_name unit,mt.maintenance_alarm_day ,
|
||||||
mt.lease_price,mt.proType,mt.level,mt.mainGx,mt.childGx,mt.devCategory ,mt.devSubcategory ,mt.devName,
|
mt.lease_price,mt.proType,mt.level,mt.mainGx,mt.childGx,mt.devCategory ,mt.devSubcategory ,mt.devName,
|
||||||
mt.devModel ,bci.company_name compName,bci.operate_address orgName,IFNULL(pro.pro_name,'-') proName,
|
mt.devModel ,bci.company_name compName,bci.operate_address orgName,IFNULL(pro.pro_name,'-') proName,
|
||||||
dev.on_project proId
|
dev.on_project proId,dev.change_status AS status
|
||||||
FROM ma_dev_info dev
|
FROM ma_dev_info dev
|
||||||
left join bm_company_info bci on bci.company_id=dev.own_co
|
left join bm_company_info bci on bci.company_id=dev.own_co
|
||||||
left join ma_type_view mt on mt.typeId=dev.type_id
|
left join ma_type_view mt on mt.typeId=dev.type_id
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,8 @@
|
||||||
<result column="next_check_time" property="nextCheckTime"/>
|
<result column="next_check_time" property="nextCheckTime"/>
|
||||||
<result column="proType" property="proType"/>
|
<result column="proType" property="proType"/>
|
||||||
<result column="unit_name" property="unitName"/>
|
<result column="unit_name" property="unitName"/>
|
||||||
|
<result column="pro_name" property="proName"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status,
|
ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status,
|
||||||
|
|
@ -78,9 +80,26 @@
|
||||||
total_up_day, total_lease_day, origina_value, change_status, expiration_time, entry_status,
|
total_up_day, total_lease_day, origina_value, change_status, expiration_time, entry_status,
|
||||||
up_down_status, json_data, buy_price, item_type_model, on_project
|
up_down_status, json_data, buy_price, item_type_model, on_project
|
||||||
</sql>
|
</sql>
|
||||||
|
<delete id="delProperties">
|
||||||
|
delete
|
||||||
|
from ma_dev_info_properties
|
||||||
|
where ma_id = #{maId}
|
||||||
|
</delete>
|
||||||
|
<insert id="insertDevInfoProperties">
|
||||||
|
insert into
|
||||||
|
ma_dev_info_properties(ma_id, property_name, property_value, create_time)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(
|
||||||
|
#{maId},
|
||||||
|
#{item.propertyName},
|
||||||
|
#{item.propertyValue},
|
||||||
|
now()
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
<select id="list" resultMap="BaseResultMap">
|
<select id="list" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT DISTINCT
|
||||||
mtv.proType,
|
mtv.proType,
|
||||||
mtv.mainGx,
|
mtv.mainGx,
|
||||||
mtv.childGx,
|
mtv.childGx,
|
||||||
|
|
@ -100,6 +119,7 @@
|
||||||
mdi.production_date,
|
mdi.production_date,
|
||||||
mdi.working_hours,
|
mdi.working_hours,
|
||||||
mdi.on_project,
|
mdi.on_project,
|
||||||
|
jsp.pro_name,
|
||||||
mdi.person,
|
mdi.person,
|
||||||
mdi.person_phone,
|
mdi.person_phone,
|
||||||
mdi.change_status,
|
mdi.change_status,
|
||||||
|
|
@ -113,7 +133,8 @@
|
||||||
LEFT JOIN sys_dept sd ON sd.dept_id = mdi.own_co
|
LEFT JOIN sys_dept sd ON sd.dept_id = mdi.own_co
|
||||||
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
||||||
LEFT JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id
|
LEFT JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id
|
||||||
WHERE mdi.is_active = 1 and mdi.entry_status = 1
|
LEFT JOIN jj_sing_project jsp ON jsp.pro_code = mdi.on_project
|
||||||
|
WHERE mdi.is_active = 1 and mdi.entry_status = 1 and mdi.own_co =#{ownCo}
|
||||||
<if test="typeId != null">
|
<if test="typeId != null">
|
||||||
and (
|
and (
|
||||||
mtv.mainGxId = #{typeId}
|
mtv.mainGxId = #{typeId}
|
||||||
|
|
@ -141,7 +162,7 @@
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="changeStatus != null and changeStatus !=''">
|
<if test="changeStatus != null and changeStatus !=''">
|
||||||
and mdi.ma_status like concat('%',#{changeStatus},'%')
|
and mdi.change_status like concat('%',#{changeStatus},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="brand != null and brand !=''">
|
<if test="brand != null and brand !=''">
|
||||||
|
|
@ -160,14 +181,6 @@
|
||||||
<if test="nextCheckTime != null and nextCheckTime !=''">
|
<if test="nextCheckTime != null and nextCheckTime !=''">
|
||||||
and mdq.next_check_time like concat('%',#{nextCheckTime},'%')
|
and mdq.next_check_time like concat('%',#{nextCheckTime},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateDeviceStatus">
|
<update id="updateDeviceStatus">
|
||||||
|
|
@ -175,13 +188,135 @@
|
||||||
UPDATE ma_dev_info SET up_down_status = #{data.value} where ma_id =#{data.key}
|
UPDATE ma_dev_info SET up_down_status = #{data.value} where ma_id =#{data.key}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<!-- 完善的updateDeviceApi方法 -->
|
||||||
|
<update id="updateDeviceApi" parameterType="com.bonus.material.devchange.domain.MaDevInfo">
|
||||||
|
UPDATE ma_dev_info
|
||||||
|
<set>
|
||||||
|
<!-- 基础信息字段 -->
|
||||||
|
<if test="deviceName != null and deviceName != ''">
|
||||||
|
device_name = #{deviceName},
|
||||||
|
</if>
|
||||||
|
|
||||||
<select id="delDevice" resultType="java.lang.Integer">
|
<if test="deviceWeight != null">
|
||||||
|
device_weight = #{deviceWeight},
|
||||||
|
</if>
|
||||||
|
<if test="deviceCount != null">
|
||||||
|
device_count = #{deviceCount},
|
||||||
|
</if>
|
||||||
|
<if test="code != null and code != ''">
|
||||||
|
code = #{code},
|
||||||
|
</if>
|
||||||
|
<if test="identifyCode != null and identifyCode != ''">
|
||||||
|
identify_code = #{identifyCode},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id = #{typeId},
|
||||||
|
</if>
|
||||||
|
<if test="maStatus != null and maStatus != ''">
|
||||||
|
ma_status = #{maStatus},
|
||||||
|
</if>
|
||||||
|
<if test="leaseScope != null and leaseScope != ''">
|
||||||
|
lease_scope = #{leaseScope},
|
||||||
|
</if>
|
||||||
|
<if test="location != null and location != ''">
|
||||||
|
`location` = #{location},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 设备属性字段 -->
|
||||||
|
<if test="brand != null and brand != ''">
|
||||||
|
brand = #{brand},
|
||||||
|
</if>
|
||||||
|
<if test="modelName != null and modelName != ''">
|
||||||
|
model_name = #{modelName},
|
||||||
|
</if>
|
||||||
|
<if test="productionDate != null">
|
||||||
|
production_date = #{productionDate},
|
||||||
|
</if>
|
||||||
|
<if test="workingHours != null">
|
||||||
|
working_hours = #{workingHours},
|
||||||
|
</if>
|
||||||
|
<if test="serialNumber != null and serialNumber != ''">
|
||||||
|
serial_number = #{serialNumber},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 价格相关字段 -->
|
||||||
|
<if test="monthLeasePrice != null">
|
||||||
|
month_lease_price = #{monthLeasePrice},
|
||||||
|
</if>
|
||||||
|
<if test="dayLeasePrice != null">
|
||||||
|
day_lease_price = #{dayLeasePrice},
|
||||||
|
</if>
|
||||||
|
<if test="jsMonthPrice != null">
|
||||||
|
js_month_price = #{jsMonthPrice},
|
||||||
|
</if>
|
||||||
|
<if test="jsDayPrice != null">
|
||||||
|
js_day_price = #{jsDayPrice},
|
||||||
|
</if>
|
||||||
|
<if test="deposit != null">
|
||||||
|
deposit = #{deposit},
|
||||||
|
</if>
|
||||||
|
<if test="buyPrice != null">
|
||||||
|
buy_price = #{buyPrice},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 状态相关字段 -->
|
||||||
|
<if test="isActive != null">
|
||||||
|
is_active = #{isActive},
|
||||||
|
</if>
|
||||||
|
<if test="changeStatus != null and changeStatus != ''">
|
||||||
|
change_status = #{changeStatus},
|
||||||
|
</if>
|
||||||
|
<if test="expirationTime != null">
|
||||||
|
expiration_time = #{expirationTime},
|
||||||
|
</if>
|
||||||
|
<if test="entryStatus != null and entryStatus != ''">
|
||||||
|
entry_status = #{entryStatus},
|
||||||
|
</if>
|
||||||
|
<if test="upDownStatus != null and upDownStatus != ''">
|
||||||
|
up_down_status = #{upDownStatus},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 其他信息字段 -->
|
||||||
|
<if test="picUrl != null and picUrl != ''">
|
||||||
|
pic_url = #{picUrl},
|
||||||
|
</if>
|
||||||
|
<if test="videoUrl != null and videoUrl != ''">
|
||||||
|
video_url = #{videoUrl},
|
||||||
|
</if>
|
||||||
|
<if test="description != null and description != ''">
|
||||||
|
description = #{description},
|
||||||
|
</if>
|
||||||
|
<if test="gpsCode != null and gpsCode != ''">
|
||||||
|
gps_code = #{gpsCode},
|
||||||
|
</if>
|
||||||
|
<if test="onProject != null and onProject != ''">
|
||||||
|
on_project = #{onProject},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 负责人信息 -->
|
||||||
|
<if test="person != null and person != ''">
|
||||||
|
person = #{person},
|
||||||
|
</if>
|
||||||
|
<if test="personPhone != null and personPhone != ''">
|
||||||
|
person_phone = #{personPhone},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 更新时间和操作人(建议每次更新都设置) -->
|
||||||
|
update_time = now(),
|
||||||
|
<if test="updateBy != null and updateBy != ''">
|
||||||
|
update_by = #{updateBy},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<!-- 必须指定更新条件,以ma_id为主键 -->
|
||||||
|
WHERE ma_id = #{maId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="delDevice">
|
||||||
UPDATE ma_dev_info SET is_active = 0 where ma_id in
|
UPDATE ma_dev_info SET is_active = 0 where ma_id in
|
||||||
<foreach item="item" index="index" collection="list" separator="," close=")" open="(">
|
<foreach collection="array" item="maId" open="(" separator="," close=")">
|
||||||
#{item}
|
#{maId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</update>
|
||||||
|
|
||||||
<select id="deviceTree" resultType="com.bonus.material.devchange.domain.DeviceTreeBean">
|
<select id="deviceTree" resultType="com.bonus.material.devchange.domain.DeviceTreeBean">
|
||||||
SELECT mt.type_id as id,
|
SELECT mt.type_id as id,
|
||||||
|
|
@ -189,6 +324,7 @@
|
||||||
mt.level,
|
mt.level,
|
||||||
mt.parent_id as pId
|
mt.parent_id as pId
|
||||||
FROM ma_type mt
|
FROM ma_type mt
|
||||||
|
WHERE mt.level != '7'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="deviceCount" resultType="com.bonus.material.devchange.domain.DeviceCountBean">
|
<select id="deviceCount" resultType="com.bonus.material.devchange.domain.DeviceCountBean">
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update_time = now()
|
update_time = now()
|
||||||
WHERE order_id = #{orderId} and ma_id = #{maId}
|
WHERE order_id = #{orderId} and ma_id = #{maId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="orderConfirm">
|
||||||
|
UPDATE
|
||||||
|
ma_order_details
|
||||||
|
set order_status = '2',
|
||||||
|
update_time = now()
|
||||||
|
WHERE order_id = #{orderId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getdeviceCount" resultType="com.bonus.material.device.domain.DevInfo">
|
<select id="getdeviceCount" resultType="com.bonus.material.device.domain.DevInfo">
|
||||||
select device_count,device_name from ma_dev_info where ma_id = #{maId} and is_active = 1
|
select device_count,device_name from ma_dev_info where ma_id = #{maId} and is_active = 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue