1. 江苏工行
This commit is contained in:
parent
4e4d8d9de6
commit
4f43975e73
|
|
@ -28,4 +28,9 @@ public @interface SysLog {
|
||||||
*/
|
*/
|
||||||
BusinessType businessType() default BusinessType.OTHER;
|
BusinessType businessType() default BusinessType.OTHER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为远程 接口,
|
||||||
|
*/
|
||||||
|
boolean remote() default false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ public class SysLogAspect {
|
||||||
SysLogEntity sysLogEntity = new SysLogEntity();
|
SysLogEntity sysLogEntity = new SysLogEntity();
|
||||||
SysLog syslog =
|
SysLog syslog =
|
||||||
method.getAnnotation(SysLog.class);
|
method.getAnnotation(SysLog.class);
|
||||||
|
boolean remote = false;
|
||||||
if (syslog != null) {
|
if (syslog != null) {
|
||||||
String value = syslog.value();
|
String value = syslog.value();
|
||||||
BusinessType businessType = syslog.businessType();
|
BusinessType businessType = syslog.businessType();
|
||||||
|
|
@ -115,6 +115,7 @@ public class SysLogAspect {
|
||||||
value = businessType.getDesc() + value;
|
value = businessType.getDesc() + value;
|
||||||
sysLogEntity.setOperationType(businessType.getCode());
|
sysLogEntity.setOperationType(businessType.getCode());
|
||||||
}
|
}
|
||||||
|
remote = syslog.remote();
|
||||||
sysLogEntity.setOperation(value);
|
sysLogEntity.setOperation(value);
|
||||||
if (null != args && args.length > 0) {
|
if (null != args && args.length > 0) {
|
||||||
// 将导出的response 过滤掉
|
// 将导出的response 过滤掉
|
||||||
|
|
@ -159,11 +160,12 @@ public class SysLogAspect {
|
||||||
sysLogEntity.setUsername(username);
|
sysLogEntity.setUsername(username);
|
||||||
//保存系统日志
|
//保存系统日志
|
||||||
} else {
|
} else {
|
||||||
if (!ipAddr.equals("localhost") && !ipAddr.equals("127.0.0.1")) {
|
|
||||||
|
if (!ipAddr.equals("localhost") && !ipAddr.equals("127.0.0.1") && remote) {
|
||||||
throw new ResultException("没有权限");
|
throw new ResultException("没有权限");
|
||||||
}
|
}
|
||||||
sysLogEntity.setUserId(1L);
|
sysLogEntity.setUserId(1L);
|
||||||
sysLogEntity.setUsername("error");
|
sysLogEntity.setUsername("system");
|
||||||
}
|
}
|
||||||
String startTime = request.getHeader(CommonConstants.START_TIME);
|
String startTime = request.getHeader(CommonConstants.START_TIME);
|
||||||
// 执行时间
|
// 执行时间
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,11 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
||||||
// 用于填充 创建人以及修改人
|
// 用于填充 创建人以及修改人
|
||||||
// String userName = SecurityContextHolder.getUserName();
|
// String userName = SecurityContextHolder.getUserName();
|
||||||
String userName = "system";
|
String userName = "system";
|
||||||
|
this.fillStrategy(metaObject, "createBy", userName);
|
||||||
|
// 自动填充下 版本号
|
||||||
|
this.fillStrategy(metaObject, "version", 0);
|
||||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
|
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
|
||||||
this.strictInsertFill(metaObject, "createBy", String.class, userName);
|
// this.strictInsertFill(metaObject, "createBy", String.class, userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -45,6 +48,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
||||||
String userName = "system";
|
String userName = "system";
|
||||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
||||||
this.strictUpdateFill(metaObject, "updateBy", String.class, userName);
|
this.strictUpdateFill(metaObject, "updateBy", String.class, userName);
|
||||||
|
// 自动填充下 版本号
|
||||||
|
this.fillStrategy(metaObject, "version", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.chushang.inspection.terminal.enums;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum MerTypeOperation {
|
||||||
|
// 1-POS 商户,2-条码支付商户
|
||||||
|
POS_MERCHANT("1", 7),
|
||||||
|
BARCODE_PAYMENT_MERCHANT("2", 8);
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final Integer merType;
|
||||||
|
|
||||||
|
// 通过编号获取枚举值
|
||||||
|
public static Integer valueOfCode(String code) {
|
||||||
|
if (StrUtil.isEmpty(code)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (MerTypeOperation operation : MerTypeOperation.values()) {
|
||||||
|
if (operation.code.equals(code)) {
|
||||||
|
return operation.merType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过编号获取枚举值
|
||||||
|
public static String valueOfMerType(Integer workType) {
|
||||||
|
if (workType == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (MerTypeOperation operation : MerTypeOperation.values()) {
|
||||||
|
if (operation.merType.equals(workType)) {
|
||||||
|
return operation.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,10 @@ import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.chushang.inspection.terminal.enums.MerTypeOperation;
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
|
import com.chushang.inspection.work.enums.BankBranchesEnum;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
@ -162,4 +166,22 @@ public class Store extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "state")
|
@TableField(value = "state")
|
||||||
private Integer state;
|
private Integer state;
|
||||||
|
|
||||||
|
public Store save(WrkIcbcJsReceive dto) {
|
||||||
|
this.storeNo = dto.getMerId();
|
||||||
|
this.storeName = dto.getMerName();
|
||||||
|
this.storeContact = dto.getLinkName();
|
||||||
|
this.storePhone = dto.getContactWay();
|
||||||
|
this.storeAddress = dto.getMerAddress();
|
||||||
|
this.storeType = MerTypeOperation.valueOfCode(dto.getMerType());
|
||||||
|
// todo 所属 任务id
|
||||||
|
this.taskId = 1L;
|
||||||
|
// todo 所属部门id
|
||||||
|
this.deptId = 1L;
|
||||||
|
this.createBy = "zhuguihua";
|
||||||
|
this.isEnter = 2;
|
||||||
|
Long lowerTaskId = BankBranchesEnum.getByCode(dto.getArea());
|
||||||
|
this.lowerTaskId = lowerTaskId == null ? this.taskId : lowerTaskId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
|
import com.chushang.inspection.work.enums.TerminalTypeOperation;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
@ -129,4 +132,18 @@ public class Terminal extends BaseEntity {
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
public Terminal save(Store store, WrkIcbcJsReceive dto) {
|
||||||
|
this.storeId = store.getStoreId();
|
||||||
|
this.storeNo = store.getStoreNo();
|
||||||
|
this.taskId = store.getTaskId();
|
||||||
|
this.lowerTaskId = store.getLowerTaskId();
|
||||||
|
this.deptId = store.getDeptId();
|
||||||
|
this.createBy = store.getCreateBy();
|
||||||
|
this.terminalNo = dto.getTermId();
|
||||||
|
this.terminalSn = dto.getDeviceNo();
|
||||||
|
this.terminalType = TerminalTypeOperation.valueOfCode(dto.getDeviceType());
|
||||||
|
this.remark = dto.getNoteMsg();
|
||||||
|
this.occupy = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,30 +29,6 @@ public class TerminalIns extends BaseEntity {
|
||||||
@TableId(value = "terminal_id", type = IdType.ASSIGN_ID)
|
@TableId(value = "terminal_id", type = IdType.ASSIGN_ID)
|
||||||
private Long terminalId;
|
private Long terminalId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@TableField(value = "dept_id")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务id
|
|
||||||
*/
|
|
||||||
@TableField(value = "task_id")
|
|
||||||
private Long taskId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下级任务id
|
|
||||||
*/
|
|
||||||
@TableField(value = "lower_task_id")
|
|
||||||
private Long lowerTaskId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 所属商户id
|
|
||||||
*/
|
|
||||||
@TableField(value = "store_id")
|
|
||||||
private Long storeId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 银行资产管理码
|
* 银行资产管理码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,7 @@ import java.time.LocalDateTime;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DispatchDTO implements Serializable {
|
public class DispatchDTO implements Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
private Long terminalId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
|
|
@ -128,6 +125,11 @@ public class DispatchDTO implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String legalName;
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端sn号
|
* 终端sn号
|
||||||
*/
|
*/
|
||||||
|
|
@ -184,24 +186,24 @@ public class DispatchDTO implements Serializable {
|
||||||
protected LocalDateTime createTime;
|
protected LocalDateTime createTime;
|
||||||
|
|
||||||
public DispatchDTO dispatch(WrkIcbcJs entity) {
|
public DispatchDTO dispatch(WrkIcbcJs entity) {
|
||||||
terminalId = entity.getTerminalId();
|
this.terminalId = entity.getTerminalId();
|
||||||
// 此处应当为 江苏工行的部门id
|
// todo 此处应当为 江苏工行的部门id
|
||||||
deptId = 200L;
|
this.deptId = 200L;
|
||||||
taskId = 1701151817643495425L;
|
this.taskId = 1701151817643495425L;
|
||||||
storeId = entity.getStoreId();
|
this.storeId = entity.getStoreId();
|
||||||
Long lowerTaskId = BankBranchesEnum.getByCode(entity.getArea());
|
Long lowerTaskId = BankBranchesEnum.getByCode(entity.getArea());
|
||||||
this.lowerTaskId = lowerTaskId == null ? this.taskId : lowerTaskId;
|
this.lowerTaskId = lowerTaskId == null ? this.taskId : lowerTaskId;
|
||||||
storeNo = entity.getMerId();
|
this.storeNo = entity.getMerId();
|
||||||
storeName = entity.getMerName();
|
this.storeName = entity.getMerName();
|
||||||
storeContact = entity.getLinkName();
|
this.storeContact = entity.getLinkName();
|
||||||
storePhone = entity.getContactWay();
|
this.storePhone = entity.getContactWay();
|
||||||
storeAddress = entity.getMerAddress();
|
this.storeAddress = entity.getMerAddress();
|
||||||
createBy = "zhuguihua";
|
this.createBy = "zhuguihua";
|
||||||
createTime = LocalDateTime.now();
|
this.createTime = LocalDateTime.now();
|
||||||
terminalAddress = entity.getMerAddress();
|
this.terminalAddress = entity.getMerAddress();
|
||||||
terminalNo = entity.getTermId();
|
this.terminalNo = entity.getTermId();
|
||||||
terminalSn = entity.getDeviceNo();
|
this.terminalSn = entity.getDeviceNo();
|
||||||
terminalType = TerminalTypeOperation.valueOfCode(entity.getDeviceType());
|
this.terminalType = TerminalTypeOperation.valueOfCode(entity.getDeviceType());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,19 @@
|
||||||
package com.chushang.inspection.work.po;
|
package com.chushang.inspection.work.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.chushang.common.mybatis.base.BaseEntity;
|
import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
@ -19,11 +27,13 @@ import lombok.NoArgsConstructor;
|
||||||
* 江苏工行数据推送
|
* 江苏工行数据推送
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper=true)
|
@EqualsAndHashCode
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@TableName(value = "wrk_icbc_js")
|
@TableName(value = "wrk_icbc_js")
|
||||||
public class WrkIcbcJs extends BaseEntity {
|
public class WrkIcbcJs implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
|
|
@ -136,13 +146,13 @@ public class WrkIcbcJs extends BaseEntity {
|
||||||
* 请求日期
|
* 请求日期
|
||||||
*/
|
*/
|
||||||
@TableField(value = "req_date")
|
@TableField(value = "req_date")
|
||||||
private Date reqDate;
|
private LocalDate reqDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求时间
|
* 请求时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "req_time")
|
@TableField(value = "req_time")
|
||||||
private Date reqTime;
|
private LocalTime reqTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单状态
|
* 工单状态
|
||||||
|
|
@ -172,7 +182,7 @@ public class WrkIcbcJs extends BaseEntity {
|
||||||
* 状态(1 下发 2 回送成功 3 回送失败)
|
* 状态(1 下发 2 回送成功 3 回送失败)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "`status`")
|
@TableField(value = "`status`")
|
||||||
private Byte status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户类型
|
* 商户类型
|
||||||
|
|
@ -184,13 +194,13 @@ public class WrkIcbcJs extends BaseEntity {
|
||||||
* 请求日期
|
* 请求日期
|
||||||
*/
|
*/
|
||||||
@TableField(value = "comp_date")
|
@TableField(value = "comp_date")
|
||||||
private Date compDate;
|
private LocalDate compDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求时间
|
* 请求时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "comp_time")
|
@TableField(value = "comp_time")
|
||||||
private Date compTime;
|
private LocalTime compTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异常消息
|
* 异常消息
|
||||||
|
|
@ -202,5 +212,6 @@ public class WrkIcbcJs extends BaseEntity {
|
||||||
* 是否为银行派单(1 是 2否)
|
* 是否为银行派单(1 是 2否)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "is_bank")
|
@TableField(value = "is_bank")
|
||||||
private Boolean isBank;
|
private Byte isBank;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,11 @@ public class WrkInfo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "work_source")
|
@TableField(value = "work_source")
|
||||||
private Integer workSource;
|
private Integer workSource;
|
||||||
|
/**
|
||||||
|
* 第三方 工单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "order_no")
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务员处理时间
|
* 业务员处理时间
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.chushang.common.mybatis.utils.PageResult;
|
||||||
import com.chushang.inspection.project.po.Template;
|
import com.chushang.inspection.project.po.Template;
|
||||||
import com.chushang.inspection.terminal.po.Store;
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
import com.chushang.inspection.terminal.query.StoreQuery;
|
import com.chushang.inspection.terminal.query.StoreQuery;
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18,4 +19,5 @@ public interface StoreService extends IService<Store>{
|
||||||
|
|
||||||
void upload(MultipartFile file, Long taskId);
|
void upload(MultipartFile file, Long taskId);
|
||||||
|
|
||||||
|
Store save(WrkIcbcJsReceive dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
package com.chushang.inspection.terminal.service;
|
package com.chushang.inspection.terminal.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
import com.chushang.inspection.project.vo.TerminalApp;
|
import com.chushang.inspection.project.vo.TerminalApp;
|
||||||
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
import com.chushang.inspection.terminal.po.Terminal;
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
||||||
import com.chushang.inspection.terminal.query.TerminalQuery;
|
import com.chushang.inspection.terminal.query.TerminalQuery;
|
||||||
import com.chushang.inspection.work.dto.DispatchDTO;
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
import com.chushang.inspection.work.query.DispatchQuery;
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
|
|
@ -49,4 +53,6 @@ public interface TerminalService extends IService<Terminal>{
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<DispatchDTO> getStoreByTasKIdOrIds(DispatchQuery query);
|
List<DispatchDTO> getStoreByTasKIdOrIds(DispatchQuery query);
|
||||||
|
|
||||||
|
JSONObject save(Store store, WrkIcbcJsReceive dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,9 @@ public class StoreImportServiceImpl extends ServiceImpl<StoreImportMapper, Store
|
||||||
terminal.setTaskId(store.getTaskId());
|
terminal.setTaskId(store.getTaskId());
|
||||||
terminal.setDeptId(SecurityUtils.getDeptId());
|
terminal.setDeptId(SecurityUtils.getDeptId());
|
||||||
terminalMapper.insert(terminal);
|
terminalMapper.insert(terminal);
|
||||||
TerminalIns terminalIns = new TerminalIns();//BeanCopyUtils.copy(storeImport, TerminalIns.class);
|
TerminalIns terminalIns = new TerminalIns();
|
||||||
|
// BeanCopyUtils.copy(storeImportDTO, TerminalIns.class);
|
||||||
terminalIns.setTerminalId(terminal.getTerminalId());
|
terminalIns.setTerminalId(terminal.getTerminalId());
|
||||||
terminalIns.setStoreId(store.getStoreId());
|
|
||||||
terminalInsMapper.insert(terminalIns);
|
terminalInsMapper.insert(terminalIns);
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.chushang.inspection.terminal.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -18,6 +19,7 @@ import com.chushang.inspection.terminal.po.Store;
|
||||||
import com.chushang.inspection.terminal.query.StoreQuery;
|
import com.chushang.inspection.terminal.query.StoreQuery;
|
||||||
import com.chushang.inspection.terminal.service.StoreService;
|
import com.chushang.inspection.terminal.service.StoreService;
|
||||||
import com.chushang.inspection.terminal.vo.StoreVO;
|
import com.chushang.inspection.terminal.vo.StoreVO;
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.chushang.inspection.terminal.mapper.StoreMapper;
|
import com.chushang.inspection.terminal.mapper.StoreMapper;
|
||||||
|
|
@ -63,6 +65,24 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 此处需要添加 任务id
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Store save(WrkIcbcJsReceive dto) {
|
||||||
|
Store store = getOne(new LambdaQueryWrapper<Store>()
|
||||||
|
.eq(Store::getTaskId, "")
|
||||||
|
.eq(Store::getStoreNo, dto.getMerId())
|
||||||
|
);
|
||||||
|
if (store == null) {
|
||||||
|
store = new Store().save(dto);
|
||||||
|
save(store);
|
||||||
|
}
|
||||||
|
return store;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<StoreVO> convert(List<Store> records){
|
private List<StoreVO> convert(List<Store> records){
|
||||||
List<StoreVO> storeVOS = new ArrayList<>();
|
List<StoreVO> storeVOS = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ package com.chushang.inspection.terminal.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.chushang.common.core.constant.SecurityConstants;
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
|
|
@ -15,14 +18,17 @@ import com.chushang.inspection.project.vo.TerminalApp;
|
||||||
import com.chushang.inspection.project.vo.TerminalAppVO;
|
import com.chushang.inspection.project.vo.TerminalAppVO;
|
||||||
import com.chushang.inspection.terminal.po.Store;
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
import com.chushang.inspection.terminal.po.Terminal;
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
|
import com.chushang.inspection.terminal.po.TerminalIns;
|
||||||
import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
||||||
import com.chushang.inspection.terminal.query.TerminalQuery;
|
import com.chushang.inspection.terminal.query.TerminalQuery;
|
||||||
import com.chushang.inspection.terminal.service.StoreService;
|
import com.chushang.inspection.terminal.service.StoreService;
|
||||||
|
import com.chushang.inspection.terminal.service.TerminalInsService;
|
||||||
import com.chushang.inspection.terminal.service.TerminalService;
|
import com.chushang.inspection.terminal.service.TerminalService;
|
||||||
import com.chushang.inspection.terminal.vo.StoreTerminalVO;
|
import com.chushang.inspection.terminal.vo.StoreTerminalVO;
|
||||||
import com.chushang.inspection.terminal.vo.TerminalVO;
|
import com.chushang.inspection.terminal.vo.TerminalVO;
|
||||||
import com.chushang.inspection.utils.TaskConfigUtils;
|
import com.chushang.inspection.utils.TaskConfigUtils;
|
||||||
import com.chushang.inspection.work.dto.DispatchDTO;
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.chushang.inspection.work.query.DispatchQuery;
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
import com.chushang.system.feign.RemoteDeptService;
|
import com.chushang.system.feign.RemoteDeptService;
|
||||||
|
|
@ -45,6 +51,8 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, Terminal> i
|
||||||
@Resource
|
@Resource
|
||||||
private StoreService storeService;
|
private StoreService storeService;
|
||||||
@Resource
|
@Resource
|
||||||
|
private TerminalInsService terminalInsService;
|
||||||
|
@Resource
|
||||||
private RemoteDeptService remoteDeptService;
|
private RemoteDeptService remoteDeptService;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -110,4 +118,26 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, Terminal> i
|
||||||
return baseMapper.getStoreByTasKIdOrIds(query);
|
return baseMapper.getStoreByTasKIdOrIds(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject save(Store store, WrkIcbcJsReceive dto) {
|
||||||
|
Terminal terminal = getOne(new LambdaQueryWrapper<Terminal>()
|
||||||
|
.eq(Terminal::getStoreId, store.getStoreId())
|
||||||
|
.eq(Terminal::getTerminalNo, dto.getTermId())
|
||||||
|
);
|
||||||
|
TerminalIns terminalIns;
|
||||||
|
if (terminal == null){
|
||||||
|
terminal = new Terminal().save(store, dto);
|
||||||
|
save(terminal);
|
||||||
|
terminalIns = new TerminalIns();
|
||||||
|
terminalIns.setTerminalId(terminal.getTerminalId());
|
||||||
|
terminalIns.setIsEnter(2);
|
||||||
|
terminalIns.setCreateBy(store.getCreateBy());
|
||||||
|
terminalInsService.save(terminalIns);
|
||||||
|
return JSONObject.of("terminal", terminal, "terminalIns", terminalIns);
|
||||||
|
}else {
|
||||||
|
terminalIns = terminalInsService.getById(terminal.getTerminalId());
|
||||||
|
}
|
||||||
|
return JSONObject.of("terminal", terminal, "terminalIns", terminalIns);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class WrkIcbcJsController {
|
||||||
@Resource
|
@Resource
|
||||||
private WrkIcbcJsService wrkIcbcJsService;
|
private WrkIcbcJsService wrkIcbcJsService;
|
||||||
|
|
||||||
@SysLog("江苏工行数据接收")
|
@SysLog(value = "江苏工行数据接收", remote = true, businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/receive")
|
@PostMapping("/receive")
|
||||||
public Result receive(@RequestBody WrkIcbcJsReceive dto) {
|
public Result receive(@RequestBody WrkIcbcJsReceive dto) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
import com.chushang.inspection.project.dto.AuditDTO;
|
import com.chushang.inspection.project.dto.AuditDTO;
|
||||||
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
|
import com.chushang.inspection.terminal.po.TerminalIns;
|
||||||
import com.chushang.inspection.work.dto.WrkInfoDTO;
|
import com.chushang.inspection.work.dto.WrkInfoDTO;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
@ -40,4 +43,7 @@ public interface WrkInfoService extends IService<WrkInfo> {
|
||||||
void audit(AuditDTO audit);
|
void audit(AuditDTO audit);
|
||||||
|
|
||||||
void exportDispatchPage(HttpServletResponse response, WrkInfoQuery query);
|
void exportDispatchPage(HttpServletResponse response, WrkInfoQuery query);
|
||||||
|
|
||||||
|
Long dispatch(WrkInfo wrkInfo, Store store, Terminal terminal, TerminalIns terminalIns);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
public interface WrkScheduleService {
|
||||||
|
void updateWorkOrderProgress(int status, Collection<Long> list);
|
||||||
|
}
|
||||||
|
|
@ -1,25 +1,90 @@
|
||||||
package com.chushang.inspection.work.service.impl;
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
|
import com.chushang.common.core.exception.utils.AssertUtil;
|
||||||
|
import com.chushang.common.core.web.Result;
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
|
import com.chushang.inspection.project.po.PollingTask;
|
||||||
|
import com.chushang.inspection.project.service.PollingTaskService;
|
||||||
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
|
import com.chushang.inspection.terminal.po.TerminalIns;
|
||||||
|
import com.chushang.inspection.terminal.service.StoreService;
|
||||||
|
import com.chushang.inspection.terminal.service.TerminalService;
|
||||||
|
import com.chushang.inspection.utils.PoolUtils;
|
||||||
|
import com.chushang.inspection.utils.TaskConfigUtils;
|
||||||
import com.chushang.inspection.work.dto.BankDispatchQuery;
|
import com.chushang.inspection.work.dto.BankDispatchQuery;
|
||||||
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
|
import com.chushang.inspection.work.enums.BankBranchesEnum;
|
||||||
|
import com.chushang.inspection.work.enums.WorkTypeOperation;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
import com.chushang.inspection.work.service.WrkScheduleService;
|
||||||
import com.chushang.inspection.work.service.WrkIcbcJsService;
|
import com.chushang.inspection.work.service.WrkIcbcJsService;
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoService;
|
||||||
import com.chushang.inspection.work.vo.BankDispatchDTO;
|
import com.chushang.inspection.work.vo.BankDispatchDTO;
|
||||||
|
import com.chushang.security.entity.po.SysUser;
|
||||||
|
import com.chushang.system.feign.RemoteUserService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.chushang.inspection.work.mapper.WrkIcbcJsMapper;
|
import com.chushang.inspection.work.mapper.WrkIcbcJsMapper;
|
||||||
import com.chushang.inspection.work.po.WrkIcbcJs;
|
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
* @date: 2024/6/28 15:38
|
* @date: 2024/6/28 15:38
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class WrkIcbcJsServiceImpl extends ServiceImpl<WrkIcbcJsMapper, WrkIcbcJs> implements WrkIcbcJsService {
|
public class WrkIcbcJsServiceImpl extends ServiceImpl<WrkIcbcJsMapper, WrkIcbcJs> implements WrkIcbcJsService {
|
||||||
|
|
||||||
@Override
|
@Resource
|
||||||
public void receive(WrkIcbcJsReceive dto) {
|
StoreService storeService;
|
||||||
|
@Resource
|
||||||
|
TerminalService terminalService;
|
||||||
|
@Resource
|
||||||
|
PollingTaskService taskService;
|
||||||
|
@Resource
|
||||||
|
RemoteUserService remoteUserService;
|
||||||
|
@Resource
|
||||||
|
WrkInfoService wrkInfoService;
|
||||||
|
@Resource
|
||||||
|
WrkScheduleService scheduleService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void receive(WrkIcbcJsReceive dto) {
|
||||||
|
Store store = storeService.save(dto);
|
||||||
|
JSONObject terJson = terminalService.save(store, dto);
|
||||||
|
WrkIcbcJs wrkIcbcJs = save(dto, terJson, store);
|
||||||
|
// 派单
|
||||||
|
PoolUtils.SENTINEL.getInstance().execute(()->{
|
||||||
|
dispatchOrder(wrkIcbcJs, terJson, store, null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private WrkIcbcJs save(WrkIcbcJsReceive dto, JSONObject terJson, Store store) {
|
||||||
|
Terminal terminal = terJson.getObject("terminal", Terminal.class);
|
||||||
|
// 江苏工行实体类信息
|
||||||
|
WrkIcbcJs wrkIcbcJs = BeanUtil.copyProperties(dto, WrkIcbcJs.class);
|
||||||
|
wrkIcbcJs.setStatus(1);
|
||||||
|
wrkIcbcJs.setStoreId(store.getStoreId());
|
||||||
|
wrkIcbcJs.setTerminalId(terminal.getTerminalId());
|
||||||
|
wrkIcbcJs.setIsBank((byte) '1');
|
||||||
|
save(wrkIcbcJs);
|
||||||
|
return wrkIcbcJs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -42,6 +107,62 @@ public class WrkIcbcJsServiceImpl extends ServiceImpl<WrkIcbcJsMapper, WrkIcbcJs
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dispatchOrder(WrkIcbcJs entity, JSONObject terJson, Store store, Long userId) {
|
||||||
|
Terminal terminal = terJson.getObject("terminal", Terminal.class);
|
||||||
|
TerminalIns terminalIns = terJson.getObject("terminalIns", TerminalIns.class);
|
||||||
|
WrkIcbcJs icbcJs = entity.getArea() != null ? entity : getById(entity.getId());
|
||||||
|
|
||||||
|
AssertUtil.invalidate(icbcJs.getStatus() == 1, "只有下发状态才能派单");
|
||||||
|
DispatchDTO dispatch = new DispatchDTO().dispatch(icbcJs);
|
||||||
|
WrkInfo wrkInfo;
|
||||||
|
if (null == userId){
|
||||||
|
Long lowerTaskId = BankBranchesEnum.getByCode(icbcJs.getArea());
|
||||||
|
AssertUtil.invalidate(lowerTaskId == null, "没有找到对应的分行");
|
||||||
|
PollingTask task = taskService.getById(lowerTaskId);
|
||||||
|
AssertUtil.invalidate(task == null && StrUtil.isEmpty(task.getContact()), "未指定业务员");
|
||||||
|
Result<Map<String, Long>> result = remoteUserService.getIdByNicknames(Set.of(), SecurityConstants.INNER);
|
||||||
|
AssertUtil.invalidate(!result.isSuccess(), "获取业务员信息失败");
|
||||||
|
wrkInfo = dispatchWrkInfo(dispatch, result.getData().get(task.getContact()), task.getContact(), WorkTypeOperation.valueOfCode(icbcJs.getOrderType()));
|
||||||
|
} else {
|
||||||
|
Result<SysUser> result = remoteUserService.getInfoById(userId, SecurityConstants.INNER);
|
||||||
|
AssertUtil.invalidate(!result.isSuccess(), "获取业务员信息失败");
|
||||||
|
wrkInfo = dispatchWrkInfo(dispatch, userId, result.getData().getNickName(), WorkTypeOperation.valueOfCode(icbcJs.getOrderType()));
|
||||||
|
}
|
||||||
|
// 派单
|
||||||
|
Long wrkId = wrkInfoService.dispatch(wrkInfo, store, terminal, terminalIns);
|
||||||
|
if (!TaskConfigUtils.isRepeat(dispatch.getTaskId())) {
|
||||||
|
// 修改 终端占用
|
||||||
|
terminalService.updateOccupy(ListUtil.toList(terminal.getTerminalId()), 1);
|
||||||
|
}
|
||||||
|
// 修改派单进度
|
||||||
|
scheduleService.updateWorkOrderProgress(6, ListUtil.toList(wrkId));
|
||||||
|
WrkIcbcJs wrkIcbcJs = new WrkIcbcJs();
|
||||||
|
wrkIcbcJs.setId(entity.getId());
|
||||||
|
wrkIcbcJs.setWrkId(wrkId);
|
||||||
|
wrkIcbcJs.setStatus(2);
|
||||||
|
// 修改 银行派单状态
|
||||||
|
updateById(wrkIcbcJs);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dispatchWrkTerminal(DispatchDTO dispatch) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dispatchWrkStore(DispatchDTO dispatch) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private WrkInfo dispatchWrkInfo(DispatchDTO dispatch, Long userId, String userName, Integer workType) {
|
||||||
|
WrkInfo wrkInfo = BeanUtil.copyProperties(dispatch, WrkInfo.class);
|
||||||
|
wrkInfo.setUserId(userId);
|
||||||
|
wrkInfo.setWorkNo(IdUtil.getSnowflake().nextId());
|
||||||
|
wrkInfo.setUserName(userName);
|
||||||
|
wrkInfo.setWrkStatus(1);
|
||||||
|
wrkInfo.setWorkType(workType);
|
||||||
|
wrkInfo.setWorkSource(3);
|
||||||
|
return wrkInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void manualPush(Long id) {
|
public void manualPush(Long id) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,28 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public Long dispatch(WrkInfo wrkInfo, Store store, Terminal terminal, TerminalIns terminalIns) {
|
||||||
|
// 工单信息
|
||||||
|
save(wrkInfo);
|
||||||
|
//终端信息
|
||||||
|
WrkInfoTerminalRecord wrkInfoTerminalRecord = BeanUtil.copyProperties(terminal, WrkInfoTerminalRecord.class);
|
||||||
|
wrkInfoTerminalRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
|
wrkInfoTerminalRecordService.save(wrkInfoTerminalRecord);
|
||||||
|
// 终端巡检信息
|
||||||
|
WrkInfoTerminalInsRecord wrkInfoTerminalInsRecord = BeanUtil.copyProperties(terminalIns, WrkInfoTerminalInsRecord.class);
|
||||||
|
wrkInfoTerminalInsRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
|
wrkInfoTerminalInsRecordService.save(wrkInfoTerminalInsRecord);
|
||||||
|
// 商户信息
|
||||||
|
WrkInfoStoreRecord wrkInfoStoreRecord = BeanUtil.copyProperties(store, WrkInfoStoreRecord.class);
|
||||||
|
wrkInfoStoreRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
|
wrkInfoStoreRecord.setDeptId(wrkInfo.getDeptId());
|
||||||
|
wrkInfoStoreRecord.setStoreId(store.getStoreId());
|
||||||
|
wrkInfoStoreRecordService.save(wrkInfoStoreRecord);
|
||||||
|
return wrkInfo.getWrkId();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算经纬度 偏差
|
* 计算经纬度 偏差
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.service.WrkScheduleService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class WrkScheduleServiceImpl implements WrkScheduleService {
|
||||||
|
public void updateWorkOrderProgress(int status, Collection<Long> list){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
import com.chushang.InspectionApplication;
|
||||||
|
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||||
|
import com.chushang.inspection.work.service.WrkIcbcJsService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
@SpringBootTest(classes = InspectionApplication.class)
|
||||||
|
public class MybatisInsertFillTest {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
WrkIcbcJsService wrkIcbcJsService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void save(){
|
||||||
|
WrkIcbcJsReceive wrkIcbcJsReceive = new WrkIcbcJsReceive();
|
||||||
|
wrkIcbcJsReceive.setMerId("merId");
|
||||||
|
|
||||||
|
wrkIcbcJsService.receive(wrkIcbcJsReceive);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue