Commit f954948c by xiehx

合并1.70.0以及之前尚未合并到主干的版本代码到主干

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@35496 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 4e059c2c
Showing 28 changed files with 504 additions and 329 deletions
...@@ -27,6 +27,18 @@ ...@@ -27,6 +27,18 @@
<artifactId>car-service-common</artifactId> <artifactId>car-service-common</artifactId>
<version>1.0.1</version> <version>1.0.1</version>
</dependency> </dependency>
<!--导出工具-->
<dependency>
<groupId>com.glsx.poi</groupId>
<artifactId>glsx-poi-jar</artifactId>
<version>2.0.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<artifactId>commons-io</artifactId>
<groupId>commons-io</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- spring-boot-devtools --> <!-- spring-boot-devtools -->
<dependency> <dependency>
...@@ -71,6 +83,16 @@ ...@@ -71,6 +83,16 @@
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jasypt</groupId> <groupId>org.jasypt</groupId>
...@@ -83,7 +105,17 @@ ...@@ -83,7 +105,17 @@
<artifactId>ore-jms</artifactId> <artifactId>ore-jms</artifactId>
<version>2.2.0-SNAPSHOT</version> <version>2.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -275,4 +275,6 @@ public interface BizConstants { ...@@ -275,4 +275,6 @@ public interface BizConstants {
*/ */
String VOLVO = "volvo"; String VOLVO = "volvo";
String EXCEL_TYPE_XLSX = "xlsx";
} }
...@@ -179,6 +179,8 @@ public enum ResultCodeEnum { ...@@ -179,6 +179,8 @@ public enum ResultCodeEnum {
INSURANCE_UPDATE_ERROR(4008, "修改保单信息异常"), INSURANCE_UPDATE_ERROR(4008, "修改保单信息异常"),
INSURANCE_REFUND_STATUS_ERROR(4009, "保单当前状态无法退保"), INSURANCE_REFUND_STATUS_ERROR(4009, "保单当前状态无法退保"),
INSURANCE_LESS_SEVEN_DAY(4010, "投保不超过七天,请走退保流程"), INSURANCE_LESS_SEVEN_DAY(4010, "投保不超过七天,请走退保流程"),
CHECK_IMPORT_FILE_ERROR(12120011, "请检查模版字段"),
INDENT_IMPORT_TO_MANY(12120012, "导入数据量大于5000条,请重新导入"),
; ;
/** /**
......
package com.glsx.ordercenter.dto.imports;
import lombok.Data;
@Data
public class BaseImportInfo {
/**
* 导入成功数量
*/
private int succNum;
/**
* 导入失败数量
*/
private int failNum;
/**
* 导入总数量
*/
private int total;
/**
* 失败文件服务器地址
*/
private String failFile;
/**
* 失败文件序列号
*/
private String failSeqNoFile;
}
package com.glsx.ordercenter.dto.imports;
import com.alibaba.excel.annotation.ExcelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;
import java.io.Serializable;
/**
* 设备和订货单错误导出实体类
*/
@Data
public class DeviceAndIndentExport implements Serializable {
@ExcelProperty(value = "SN", index = 0)
private String sn;
@ExcelProperty(value = "设备名称", index = 1)
private String deviceTypeName;
@ExcelProperty(value = "物流公司", index = 2)
private String expressCompany;
@ExcelProperty(value = "物流单号", index = 3)
private String expressSn;
@ExcelProperty(value = "发货时间", index = 4)
private String logisticsTime;
@ExcelProperty(value = "服务商名称", index = 5)
private String providerName;
@ExcelProperty(value = "下属技工名称", index = 6)
private String mechanicName;
@ExcelProperty(value = "失败原因", index = 7)
private String importFailReason;
}
package com.glsx.ordercenter.dto.imports;
import com.alibaba.excel.annotation.ExcelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 设备和订货单导入实体类
*/
@Data
public class DeviceAndIndentImport implements Serializable {
@ExcelProperty(value = "SN", index = 0)
private String sn;
@ExcelProperty(value = "设备名称", index = 1)
private String deviceTypeName;
@ExcelProperty(value = "物流公司", index = 2)
private String expressCompany;
@ExcelProperty(value = "物流单号", index = 3)
private String expressSn;
@ExcelProperty(value = "发货时间", index = 4)
private String logisticsTime;
@ExcelProperty(value = "服务商名称", index = 5)
private String providerName;
@ExcelProperty(value = "下属技工名称", index = 6)
private String mechanicName;
@Ignore
private String importFailReason;
/**
* 设备类型
*/
@Ignore
private String deviceType;
/**
* 服务商用户ID
*/
@Ignore
private Integer providerUserId;
/**
* 技工用户ID
*/
@Ignore
private Integer mechanicUserId;
/**
* 快递公司编码
*/
@Ignore
private String expressCompanyUnicode;
/**
* 设备号集合
*/
@Ignore
private List<String> snList;
}
package com.glsx.ordercenter.enums;
import lombok.Getter;
/**
* @author Yanglinlong
* @date 2023/8/22 18:10
*/
@Getter
public enum DeviceTypeNameEnum {
SYS_ORDER_SERVICE_ITEM_GPS("sys_order_service_item_gps", "有线GPS"),
SYS_ORDER_SERVICE_ITEM_GPS_WIRELESS("sys_order_service_item_gps_wireless", "无线GPS"),
SYS_ORDER_SERVICE_ITEM_GPS_GT700F("sys_order_service_item_gps_GT700F", "先锋700F"),
DSC_ORDER_SERVICE_ITEM_WIRED("sys_order_service_item_wireline_dasouche", "大搜车有源");
private final String type;
private final String name;
DeviceTypeNameEnum(String type, String name) {
this.type = type;
this.name = name;
}
public static String getTypeByName(String Name) {
for (DeviceTypeNameEnum typeNameEnum : DeviceTypeNameEnum.values()) {
if (typeNameEnum.getName().equals(Name)) {
return typeNameEnum.getType();
}
}
return "--";
}
}
...@@ -52,4 +52,6 @@ public interface SysAreaMapper { ...@@ -52,4 +52,6 @@ public interface SysAreaMapper {
* @return * @return
*/ */
List<FullAreaAndIdDto> getFullAreaAndAreaId(); List<FullAreaAndIdDto> getFullAreaAndAreaId();
SysArea getAreaByAreaName(@Param("areaName") String areaName);
} }
...@@ -26,9 +26,9 @@ public interface SysIndentMapper { ...@@ -26,9 +26,9 @@ public interface SysIndentMapper {
Integer getSendDeviceNum(@Param("userId") Integer userId, @Param("deviceType")String deviceType); Integer getSendDeviceNum(@Param("userId") Integer userId, @Param("deviceType")String deviceType);
/** /**
* *
* @author zhanghj * @author zhanghj
* @Title: getIndentListByPage * @Title: getIndentListByPage
* @Description: TODO 分页获取订货单列表 * @Description: TODO 分页获取订货单列表
* @param indent * @param indent
* @return * @return
...@@ -41,9 +41,9 @@ public interface SysIndentMapper { ...@@ -41,9 +41,9 @@ public interface SysIndentMapper {
SysIndent getByIndentNo(String indentNo); SysIndent getByIndentNo(String indentNo);
/** /**
* *
* @author zhanghj * @author zhanghj
* @Title: getDetail * @Title: getDetail
* @Description: TODO 获取订货单详情 * @Description: TODO 获取订货单详情
* @param id * @param id
* @return * @return
...@@ -64,9 +64,9 @@ public interface SysIndentMapper { ...@@ -64,9 +64,9 @@ public interface SysIndentMapper {
SysIndent getByUserIdAndDeviceNo(@Param("userId")int userId, @Param("deviceNo")String deviceNo); SysIndent getByUserIdAndDeviceNo(@Param("userId")int userId, @Param("deviceNo")String deviceNo);
/** /**
* *
* @author zhanghj * @author zhanghj
* @Title: getMechanicIndentList * @Title: getMechanicIndentList
* @Description: TODO 获取技工端订货单列表 * @Description: TODO 获取技工端订货单列表
* @param indent * @param indent
* @return * @return
...@@ -76,9 +76,9 @@ public interface SysIndentMapper { ...@@ -76,9 +76,9 @@ public interface SysIndentMapper {
List<SysIndent> getMechanicIndentList(SysIndent indent); List<SysIndent> getMechanicIndentList(SysIndent indent);
/** /**
* *
* @author zhanghj * @author zhanghj
* @Title: getSPIndentList * @Title: getSPIndentList
* @Description: TODO 获取服务商端订货单列表 * @Description: TODO 获取服务商端订货单列表
* @param indent * @param indent
* @return * @return
...@@ -88,9 +88,9 @@ public interface SysIndentMapper { ...@@ -88,9 +88,9 @@ public interface SysIndentMapper {
List<SysIndent> getSPIndentList(SysIndent indent); List<SysIndent> getSPIndentList(SysIndent indent);
/** /**
* *
* @author zhanghj * @author zhanghj
* @Title: getMechanicIndentListByPage * @Title: getMechanicIndentListByPage
* @Description: TODO 获取服务商下技工订货单列表 * @Description: TODO 获取服务商下技工订货单列表
* @param indent * @param indent
* @return * @return
...@@ -104,4 +104,6 @@ public interface SysIndentMapper { ...@@ -104,4 +104,6 @@ public interface SysIndentMapper {
Integer updateIndentStatusByIds(List<Integer> ids); Integer updateIndentStatusByIds(List<Integer> ids);
SysIndent selectByIndentNo(String indentNo); SysIndent selectByIndentNo(String indentNo);
SysIndent getIndentByExpressAndDeviceType(@Param("expressSn") String expressSn, @Param("deviceType") String deviceType, @Param("expressCompany") String expressCompany);
} }
\ No newline at end of file \ No newline at end of file
...@@ -30,4 +30,6 @@ public interface SysLogisticsMapper { ...@@ -30,4 +30,6 @@ public interface SysLogisticsMapper {
int updateByPrimaryKey(SysLogistics record); int updateByPrimaryKey(SysLogistics record);
List<SysLogistics> listSysLogistics(); List<SysLogistics> listSysLogistics();
SysLogistics selectByExpressCompany(@Param("expressCompany") String expressCompany);
} }
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.mapper; package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.pojo.user.SysManager; import com.glsx.ordercenter.pojo.user.SysManager;
import org.apache.ibatis.annotations.Param;
public interface SysManagerMapper { public interface SysManagerMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
...@@ -17,4 +18,11 @@ public interface SysManagerMapper { ...@@ -17,4 +18,11 @@ public interface SysManagerMapper {
SysManager selectByUserId(Integer userId); SysManager selectByUserId(Integer userId);
/**
* 通过服务商用户名获取服务商
*
* @param providerName 服务商用户名
* @return 服务商
*/
SysManager selectByProviderName(@Param("providerName") String providerName);
} }
\ No newline at end of file \ No newline at end of file
...@@ -44,4 +44,6 @@ public interface SysMechanicMapper { ...@@ -44,4 +44,6 @@ public interface SysMechanicMapper {
List<MechanicBusiness> getMechanicListOrderByTimeliness(@Param("keyWord") String keyWord, List<MechanicBusiness> getMechanicListOrderByTimeliness(@Param("keyWord") String keyWord,
@Param("latitude") String latitude, @Param("longitude") String longitude, @Param("latitude") String latitude, @Param("longitude") String longitude,
@Param("userId") Integer userId); @Param("userId") Integer userId);
SysMechanic selectByMechanicName(@Param("mechanicName") String mechanicName);
} }
...@@ -39,4 +39,6 @@ public interface SysUserMapper { ...@@ -39,4 +39,6 @@ public interface SysUserMapper {
* @return * @return
*/ */
List<SysUser> selectByIdList(@Param("shopIdList") Set<Integer> shopIdList); List<SysUser> selectByIdList(@Param("shopIdList") Set<Integer> shopIdList);
SysUser checkProviderAndMechanicMatch(@Param("providerUserId") Integer providerUserId, @Param("mechanicUserId") Integer mechanicUserId);
} }
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.pojo.user; package com.glsx.ordercenter.pojo.user;
import lombok.Data;
@Data
public class SysMechanic { public class SysMechanic {
private Integer id; private Integer id;
...@@ -25,117 +29,5 @@ public class SysMechanic { ...@@ -25,117 +29,5 @@ public class SysMechanic {
private Integer generateCheckSheet; private Integer generateCheckSheet;
public Integer getId() { private Integer sendType;
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getDistrict() {
return district;
}
public void setDistrict(Integer district) {
this.district = district;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
public String getWorkTimeStart() {
return workTimeStart;
}
public void setWorkTimeStart(String workTimeStart) {
this.workTimeStart = workTimeStart == null ? null : workTimeStart.trim();
}
public String getWorkTimeEnd() {
return workTimeEnd;
}
public void setWorkTimeEnd(String workTimeEnd) {
this.workTimeEnd = workTimeEnd == null ? null : workTimeEnd.trim();
}
public Byte getDispatchType() {
return dispatchType;
}
public void setDispatchType(Byte dispatchType) {
this.dispatchType = dispatchType;
}
public Byte getServiceType() {
return serviceType;
}
public void setServiceType(Byte serviceType) {
this.serviceType = serviceType;
}
public String getIdcard() {
return idcard;
}
public void setIdcard(String idcard) {
this.idcard = idcard == null ? null : idcard.trim();
}
public String getMechanicStatus() {
return mechanicStatus;
}
public void setMechanicStatus(String mechanicStatus) {
this.mechanicStatus = mechanicStatus;
}
public Integer getWorkStatus() {
return workStatus;
}
public void setWorkStatus(Integer workStatus) {
this.workStatus = workStatus;
}
public Integer getGenerateCheckSheet() {
return generateCheckSheet;
}
public void setGenerateCheckSheet(Integer generateCheckSheet) {
this.generateCheckSheet = generateCheckSheet;
}
@Override
public String toString() {
return "SysMechanic{" +
"id=" + id +
", userId=" + userId +
", district=" + district +
", address='" + address + '\'' +
", workTimeStart='" + workTimeStart + '\'' +
", workTimeEnd='" + workTimeEnd + '\'' +
", dispatchType=" + dispatchType +
", serviceType=" + serviceType +
", idcard='" + idcard + '\'' +
", mechanicStatus='" + mechanicStatus + '\'' +
", workStatus=" + workStatus +
", generateCheckSheet=" + generateCheckSheet +
'}';
}
} }
...@@ -405,4 +405,6 @@ public interface IOrderService { ...@@ -405,4 +405,6 @@ public interface IOrderService {
void syncDismantleOrder(Integer orderId); void syncDismantleOrder(Integer orderId);
Map<String, Object> checkVinAndSn(Integer orderId, Integer serviceItemId); Map<String, Object> checkVinAndSn(Integer orderId, Integer serviceItemId);
Integer getPhotoConfigFlag();
} }
...@@ -6,182 +6,172 @@ import javax.servlet.http.HttpServletRequest; ...@@ -6,182 +6,172 @@ import javax.servlet.http.HttpServletRequest;
import com.glsx.common.constants.ResultObject; import com.glsx.common.constants.ResultObject;
import com.glsx.common.utils.Page; import com.glsx.common.utils.Page;
import com.glsx.ordercenter.dto.imports.DeviceAndIndentImport;
import com.glsx.ordercenter.dto.IndentImportDeviceReq; import com.glsx.ordercenter.dto.IndentImportDeviceReq;
import com.glsx.ordercenter.dto.IndentImportDeviceResponse; import com.glsx.ordercenter.dto.IndentImportDeviceResponse;
import com.glsx.ordercenter.mapper.SysOrderServiceTypeMapper;
import com.glsx.ordercenter.pojo.SysIndent; import com.glsx.ordercenter.pojo.SysIndent;
import com.glsx.ordercenter.pojo.SysIndentLog; import com.glsx.ordercenter.pojo.SysIndentLog;
import com.glsx.ordercenter.pojo.SysIndentLogistics; import com.glsx.ordercenter.pojo.SysIndentLogistics;
import com.glsx.ordercenter.pojo.SysLogistics;
import com.glsx.ordercenter.pojo.user.SysManager;
import com.glsx.ordercenter.pojo.user.SysMechanic;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
/** /**
* * @author zhanghj
* @version 1.0.0
* @Title IndentService.java * @Title IndentService.java
* @Package com.glsx.ordercenter.service * @Package com.glsx.ordercenter.service
* @Description TODO 订货单service * @Description TODO 订货单service
* @author zhanghj
* @date 2019年6月3日 下午5:37:00 * @date 2019年6月3日 下午5:37:00
* @version 1.0.0
*/ */
public interface IndentService { public interface IndentService {
/** /**
* * @param request
* @author zhanghj * @param indent
* @param request * @return ResultObject
* @Title: add * @author zhanghj
* @Description: TODO 增加订货单 * @Title: add
* @param indent * @Description: TODO 增加订货单
* @return */
* ResultObject ResultObject add(HttpServletRequest request, SysIndent indent);
*
*/ /**
ResultObject add(HttpServletRequest request, SysIndent indent); * @param indent
* @return ResultObject
/** * @author zhanghj
* * @Title: update
* @author zhanghj * @Description: TODO 编辑订货单
* @Title: update */
* @Description: TODO 编辑订货单 ResultObject update(SysIndent indent);
* @param indent
* @return /**
* ResultObject * @param request,sysIndentLogistics
* * @author duanht
*/ * @Title: sendDevice
ResultObject update(SysIndent indent); * @Description: TODO 服务商发货
*/
/** Integer sendDevice(HttpServletRequest request, SysIndentLogistics sysIndentLogistics);
*
* @author duanht /**
* @Title: sendDevice * @author duanht
* @Description: TODO 服务商发货 * @Title: checkDevice
* @param request,sysIndentLogistics * @Description: TODO 订货单审核通过
* */
*/ int checkIndent(Integer id, Integer userId);
Integer sendDevice(HttpServletRequest request,SysIndentLogistics sysIndentLogistics);
/**
/** * @author duanht
* * @Title: selectByPrimaryKey
* @author duanht * @Description: TODO 根据id查订货单信息
* @Title: checkDevice */
* @Description: TODO 订货单审核通过 SysIndent selectByPrimaryKey(Integer id);
*
*/ /**
int checkIndent(Integer id,Integer userId); * @param page
* @param indent
/** * @return List<SysOrder>
* * @author zhanghj
* @author duanht * @Title: getIndentListByPage
* @Title: selectByPrimaryKey * @Description: TODO 分页获取库存列表
* @Description: TODO 根据id查订货单信息 */
* List<SysIndent> getIndentListByPage(Page page, SysIndent indent);
*/
SysIndent selectByPrimaryKey(Integer id);
/**
*
* @author zhanghj
* @Title: getIndentListByPage
* @Description: TODO 分页获取库存列表
* @param page
* @param indent
* @return
* List<SysOrder>
*
*/
List<SysIndent> getIndentListByPage(Page page, SysIndent indent);
List<SysIndentLog> listIndentLog(String indentId); List<SysIndentLog> listIndentLog(String indentId);
SysIndent getByIndentNo(String indentNo); SysIndent getByIndentNo(String indentNo);
/** /**
* * @param id
* @author zhanghj * @return SysIndent
* @Title: getDetail * @author zhanghj
* @Title: getDetail
* @Description: TODO 获取订货单详情 * @Description: TODO 获取订货单详情
*/
SysIndent getDetail(Integer id);
/**
* @param request
* @param id * @param id
* @return * @return ResultObject
* SysIndent * @author zhanghj
* @Title: cancel
* @Description: TODO 取消订货单
*/
ResultObject cancel(HttpServletRequest request, Integer id, Integer terminalType);
/**
* @param request
* @param page
* @param indent
* @return List<SysIndent>
* @author zhanghj
* @Title: getIndentListByTerminalType
* @Description: TODO 小程序端获取订货单列表
*/
List<SysIndent> getIndentListByTerminalType(HttpServletRequest request, Page page, SysIndent indent);
/**
* @param request
* @param id
* @return ResultObject
* @author zhanghj
* @Title: isConfirmReceipt
* @Description: TODO 查询是否确认收货
*/
ResultObject isConfirmReceipt(HttpServletRequest request, Integer id);
/**
* @param request
* @param id
* @return ResultObject
* @author zhanghj
* @Title: confirmReceipt
* @Description: TODO 确认收货
*/
ResultObject confirmReceipt(HttpServletRequest request, Integer id, Integer currentUserId);
/**
* @param request
* @param page
* @param indent
* @return List<SysIndent>
* @author zhanghj
* @Title: getMechanicIndentListByPage
* @Description: TODO 获取服务商下技工订货单列表
*/
List<SysIndent> getMechanicIndentListByPage(HttpServletRequest request, Page page, SysIndent indent);
List<IndentImportDeviceReq> getImportDeviceDetail(Page page, Integer indentId, String deviceNo);
Boolean deleteIndentImportDeviceById(Integer id);
IndentImportDeviceResponse checkImportIndentDevice(MultipartFile file);
List<String> getDeviceNoList(String indentNo);
void addIndentDeviceLog(Integer id, Integer indentStatus, String remark, Integer createBy);
/**
* 批量导入设备和订货单
* *
* @param importList 设备和订货单数据
* @return
*/ */
SysIndent getDetail(Integer id); List<DeviceAndIndentImport> batchDeviceAndIndentImport(List<DeviceAndIndentImport> importList, Integer userId);
/** Integer countImportDeviceByDeviceNo(String sn);
*
* @author zhanghj Integer countDeviceByDeviceNo(String sn);
* @param request
* @Title: cancel SysManager checkProviderName(String providerName);
* @Description: TODO 取消订货单
* @param id SysMechanic checkMechanicName(String mechanicName);
* @return
* ResultObject boolean checkProviderAndMechanicMatch(Integer providerUserId, Integer MechanicUserId);
*
*/ SysLogistics checkExpressCompany(String expressCompany);
ResultObject cancel(HttpServletRequest request, Integer id, Integer terminalType);
/**
*
* @author zhanghj
* @param request
* @Title: getIndentListByTerminalType
* @Description: TODO 小程序端获取订货单列表
* @param page
* @param indent
* @return
* List<SysIndent>
*
*/
List<SysIndent> getIndentListByTerminalType(HttpServletRequest request, Page page, SysIndent indent);
/**
*
* @author zhanghj
* @Title: isConfirmReceipt
* @Description: TODO 查询是否确认收货
* @param request
* @param id
* @return
* ResultObject
*
*/
ResultObject isConfirmReceipt(HttpServletRequest request, Integer id);
/**
*
* @author zhanghj
* @Title: confirmReceipt
* @Description: TODO 确认收货
* @param request
* @param id
* @return
* ResultObject
*
*/
ResultObject confirmReceipt(HttpServletRequest request, Integer id, Integer currentUserId);
/**
*
* @author zhanghj
* @Title: getMechanicIndentListByPage
* @Description: TODO 获取服务商下技工订货单列表
* @param request
* @param page
* @param indent
* @return
* List<SysIndent>
*
*/
List<SysIndent> getMechanicIndentListByPage(HttpServletRequest request,
Page page, SysIndent indent);
List<IndentImportDeviceReq> getImportDeviceDetail(Page page, Integer indentId, String deviceNo);
Boolean deleteIndentImportDeviceById(Integer id);
IndentImportDeviceResponse checkImportIndentDevice(MultipartFile file);
List<String> getDeviceNoList(String indentNo);
void addIndentDeviceLog(Integer id, Integer indentStatus, String remark, Integer createBy);
} }
...@@ -3820,6 +3820,12 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3820,6 +3820,12 @@ public class OrderServiceImpl implements IOrderService {
// ResultCodeEnum.DISTANCE_RESERVE_TIME_ONE_HOUR.getMsg()); // ResultCodeEnum.DISTANCE_RESERVE_TIME_ONE_HOUR.getMsg());
// } // }
// } // }
// 校验工单状态
if (OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_CANCEL.getActiveStatus() == order.getCanceled()) {
return new ResultObject(ResultCodeEnum.ORDER_CANCELED_RERESH_LIST.getCode(), ResultCodeEnum.ORDER_CANCELED_RERESH_LIST.getMsg());
} else if (OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_FINISH.getActiveStatus() == order.getActiveStatus()) {
return new ResultObject(ResultCodeEnum.ORDER_FINISH.getCode(), ResultCodeEnum.ORDER_FINISH.getMsg());
}
SysOrder sysOrder = new SysOrder(); SysOrder sysOrder = new SysOrder();
sysOrder.setId(id); sysOrder.setId(id);
sysOrder.setActiveStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_MECHANIC_NOT_FINISH.getActiveStatus()); sysOrder.setActiveStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_MECHANIC_NOT_FINISH.getActiveStatus());
...@@ -4312,7 +4318,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -4312,7 +4318,7 @@ public class OrderServiceImpl implements IOrderService {
return new ResultObject(ResultCodeEnum.DEVICE_BELONG_USER.getCode(), ResultCodeEnum.DEVICE_BELONG_USER.getMsg()); return new ResultObject(ResultCodeEnum.DEVICE_BELONG_USER.getCode(), ResultCodeEnum.DEVICE_BELONG_USER.getMsg());
} }
//扣减库存 //扣减库存
reduceStock(orderDeviceList,userId); reduceStock(orderDeviceList, userId);
//保存数据 //保存数据
boolean isAudit = (item.getIsAudit() == 1 || order.getAuditStatus() != -1); boolean isAudit = (item.getIsAudit() == 1 || order.getAuditStatus() != -1);
...@@ -4328,19 +4334,19 @@ public class OrderServiceImpl implements IOrderService { ...@@ -4328,19 +4334,19 @@ public class OrderServiceImpl implements IOrderService {
return resultObject; return resultObject;
} }
private void reduceStock(List<SysOrderDevice> orderDeviceList, int userId){ private void reduceStock(List<SysOrderDevice> orderDeviceList, int userId) {
try { try {
List<String> list = orderDeviceList.stream().map(SysOrderDevice::getDeviceNo).collect(Collectors.toList()); List<String> list = orderDeviceList.stream().map(SysOrderDevice::getDeviceNo).collect(Collectors.toList());
SysDeviceExample deviceExample = new SysDeviceExample(); SysDeviceExample deviceExample = new SysDeviceExample();
deviceExample.createCriteria().andUserIdEqualTo(userId).andDeviceStatusEqualTo(Constants.DEVICE_STATUS_NO_ACTIVE).andDeviceNoIn(list); deviceExample.createCriteria().andUserIdEqualTo(userId).andDeviceStatusEqualTo(Constants.DEVICE_STATUS_NO_ACTIVE).andDeviceNoIn(list);
List<SysDevice> sysDevices = deviceMapper.selectByExample(deviceExample); List<SysDevice> sysDevices = deviceMapper.selectByExample(deviceExample);
if (sysDevices.isEmpty()){ if (sysDevices.isEmpty()) {
return; return;
} }
for (SysDevice device : sysDevices) { for (SysDevice device : sysDevices) {
//设备关联的订单未确认收货不允许激活(通过拆除或者检修入库的设备没有订货单,单号可以为空) //设备关联的订单未确认收货不允许激活(通过拆除或者检修入库的设备没有订货单,单号可以为空)
SysIndent sysIndent = indentMapper.getByUserIdAndDeviceNo(userId, device.getDeviceNo()); SysIndent sysIndent = indentMapper.getByUserIdAndDeviceNo(userId, device.getDeviceNo());
if (sysIndent == null){ if (sysIndent == null) {
continue; continue;
} }
if (sysIndent.getIndentStatus() != IndentStatusEnum.INDENT_COMPLETE.getIndentStatus()) { if (sysIndent.getIndentStatus() != IndentStatusEnum.INDENT_COMPLETE.getIndentStatus()) {
...@@ -5431,4 +5437,13 @@ public class OrderServiceImpl implements IOrderService { ...@@ -5431,4 +5437,13 @@ public class OrderServiceImpl implements IOrderService {
return resMap; return resMap;
} }
@Override
public Integer getPhotoConfigFlag() {
// 暂时废弃掉 不做开发
// 获取配置
// String flagStr = PropertiesUtil.getProperty("bhg.photo.config.flag", "1");
// return Integer.valueOf(flagStr);
return 1;
}
} }
...@@ -195,4 +195,9 @@ ...@@ -195,4 +195,9 @@
LEFT JOIN sys_area sa1 ON sa.parent_id = sa1.id LEFT JOIN sys_area sa1 ON sa.parent_id = sa1.id
LEFT JOIN sys_area sa2 ON sa1.parent_id = sa2.id LEFT JOIN sys_area sa2 ON sa1.parent_id = sa2.id
</select> </select>
<select id="getAreaByAreaName" resultMap="BaseResultMap">
SELECT *
FROM sys_area
WHERE area_name = #{areaName} limit 1
</select>
</mapper> </mapper>
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
</association> </association>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, indent_no, user_id, device_type, device_amount, indent_status, is_canceled, district_code, id, indent_no, user_id, device_type, device_amount, indent_status, is_canceled, district_code,
address, remark, create_by, create_time, update_by, update_time,phone address, remark, create_by, create_time, update_by, update_time,phone
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from sys_indent from sys_indent
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -46,17 +46,17 @@ ...@@ -46,17 +46,17 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into sys_indent (indent_no, send_type, user_id, insert into sys_indent (indent_no, send_type, user_id,
device_type, device_amount, indent_status, device_type, device_amount, indent_status,
is_canceled, phone, receiver_name, is_canceled, phone, receiver_name,
district_code, address, remark, district_code, address, remark,
create_by, create_time, update_by, create_by, create_time, update_by,
update_time) update_time)
values (#{indentNo,jdbcType=VARCHAR}, #{sendType,jdbcType=TINYINT}, #{userId,jdbcType=INTEGER}, values (#{indentNo,jdbcType=VARCHAR}, #{sendType,jdbcType=TINYINT}, #{userId,jdbcType=INTEGER},
#{deviceType,jdbcType=VARCHAR}, #{deviceAmount,jdbcType=INTEGER}, #{indentStatus,jdbcType=INTEGER}, #{deviceType,jdbcType=VARCHAR}, #{deviceAmount,jdbcType=INTEGER}, #{indentStatus,jdbcType=INTEGER},
#{isCanceled,jdbcType=TINYINT}, #{phone,jdbcType=VARCHAR}, #{receiverName,jdbcType=VARCHAR}, #{isCanceled,jdbcType=TINYINT}, #{phone,jdbcType=VARCHAR}, #{receiverName,jdbcType=VARCHAR},
#{districtCode,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{districtCode,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createBy,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=INTEGER}, #{createBy,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysIndent"> <insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysIndent">
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="getIndentCount" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultType="java.lang.Integer"> <select id="getIndentCount" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultType="java.lang.Integer">
select count(*) from sys_indent select count(*) from sys_indent
<where> <where>
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
where ssm.service_id = #{userId} where ssm.service_id = #{userId}
); );
</select> </select>
<select id="getIndentListByPage" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap"> <select id="getIndentListByPage" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap">
<if test="username != null and username != ''"> <if test="username != null and username != ''">
<bind name="username" value="'%' + username + '%'"/> <bind name="username" value="'%' + username + '%'"/>
...@@ -281,9 +281,9 @@ ...@@ -281,9 +281,9 @@
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
<bind name="endDate" value="endDate + ' 23:59'"/> <bind name="endDate" value="endDate + ' 23:59'"/>
</if> </if>
select select
si.id, si.indent_no, si.send_type, si.user_id, si.device_type, si.id, si.indent_no, si.send_type, si.user_id, si.device_type,
si.device_amount, si.indent_status, si.is_canceled, si.phone, si.device_amount, si.indent_status, si.is_canceled, si.phone,
si.receiver_name, si.district_code, si.address, si.remark, si.indent_type, si.receiver_name, si.district_code, si.address, si.remark, si.indent_type,
si.create_by, si.create_time, si.update_by, si.update_time, si.create_by, si.create_time, si.update_by, si.update_time,
su.username,su.name,su.user_type, su.username,su.name,su.user_type,
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
<select id="getByIndentNo" resultMap="BaseResultMap"> <select id="getByIndentNo" resultMap="BaseResultMap">
SELECT * from sys_indent WHERE indent_no=#{indentNo} SELECT * from sys_indent WHERE indent_no=#{indentNo}
</select> </select>
<resultMap id="detailResultMap" type="com.glsx.ordercenter.pojo.SysIndent"> <resultMap id="detailResultMap" type="com.glsx.ordercenter.pojo.SysIndent">
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="indent_no" jdbcType="VARCHAR" property="indentNo" /> <result column="indent_no" jdbcType="VARCHAR" property="indentNo" />
...@@ -353,9 +353,9 @@ ...@@ -353,9 +353,9 @@
</association> </association>
</resultMap> </resultMap>
<select id="getDetail" parameterType="java.lang.Integer" resultMap="detailResultMap"> <select id="getDetail" parameterType="java.lang.Integer" resultMap="detailResultMap">
select select
si.id, si.indent_no, si.send_type, si.user_id, si.device_type, si.id, si.indent_no, si.send_type, si.user_id, si.device_type,
si.device_amount, si.indent_status, si.is_canceled, si.phone, si.device_amount, si.indent_status, si.is_canceled, si.phone,
si.receiver_name, si.district_code, si.address, si.remark, si.receiver_name, si.district_code, si.address, si.remark,
si.create_by, si.create_time, si.update_by, si.update_time,si.indent_type, si.create_by, si.create_time, si.update_by, si.update_time,si.indent_type,
su.username,su.name,su.user_type, su.username,su.name,su.user_type,
...@@ -384,14 +384,14 @@ ...@@ -384,14 +384,14 @@
LEFT JOIN sys_device sd ON s.indent_no = sd.indent_no LEFT JOIN sys_device sd ON s.indent_no = sd.indent_no
where sd.user_id = #{userId} AND sd.device_no = #{deviceNo} where sd.user_id = #{userId} AND sd.device_no = #{deviceNo}
</select> </select>
<select id="getMechanicIndentList" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap"> <select id="getMechanicIndentList" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap">
<if test="queryContent != null and queryContent != ''"> <if test="queryContent != null and queryContent != ''">
<bind name="queryContent" value="'%' + queryContent + '%'"/> <bind name="queryContent" value="'%' + queryContent + '%'"/>
</if> </if>
select select
si.id, si.indent_no, si.send_type, si.user_id, si.device_type, si.id, si.indent_no, si.send_type, si.user_id, si.device_type,
si.device_amount, si.indent_status, si.is_canceled, si.phone, si.device_amount, si.indent_status, si.is_canceled, si.phone,
si.receiver_name, si.district_code, si.address, si.remark, si.receiver_name, si.district_code, si.address, si.remark,
si.create_by, si.create_time, si.update_by, si.update_time,si.indent_type, si.create_by, si.create_time, si.update_by, si.update_time,si.indent_type,
su.username, su.username,
...@@ -419,14 +419,14 @@ ...@@ -419,14 +419,14 @@
</where> </where>
ORDER BY si.create_time desc, si.id DESC ORDER BY si.create_time desc, si.id DESC
</select> </select>
<select id="getSPIndentList" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap"> <select id="getSPIndentList" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap">
<if test="queryContent != null and queryContent != ''"> <if test="queryContent != null and queryContent != ''">
<bind name="queryContent" value="'%' + queryContent + '%'"/> <bind name="queryContent" value="'%' + queryContent + '%'"/>
</if> </if>
select select
si.id, si.indent_no, si.send_type, si.user_id, si.device_type, si.id, si.indent_no, si.send_type, si.user_id, si.device_type,
si.device_amount, si.indent_status, si.is_canceled, si.phone, si.device_amount, si.indent_status, si.is_canceled, si.phone,
si.receiver_name, si.district_code, si.address, si.remark, si.receiver_name, si.district_code, si.address, si.remark,
si.create_by, si.create_time, si.update_by, si.update_time,si.indent_type, si.create_by, si.create_time, si.update_by, si.update_time,si.indent_type,
su.username, su.username,
...@@ -453,16 +453,16 @@ ...@@ -453,16 +453,16 @@
</if> </if>
</where> </where>
ORDER BY si.create_time DESC, si.id DESC ORDER BY si.create_time DESC, si.id DESC
</select> </select>
<select id="getMechanicIndentListByPage" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap"> <select id="getMechanicIndentListByPage" parameterType="com.glsx.ordercenter.pojo.SysIndent" resultMap="BaseResultMap">
<if test="queryContent != null and queryContent != ''"> <if test="queryContent != null and queryContent != ''">
<bind name="queryContent" value="'%' + queryContent + '%'"/> <bind name="queryContent" value="'%' + queryContent + '%'"/>
</if> </if>
select select
si.id, si.indent_no, si.send_type, si.user_id, si.device_type, si.id, si.indent_no, si.send_type, si.user_id, si.device_type,
si.device_amount, si.indent_status, si.is_canceled, si.phone, si.device_amount, si.indent_status, si.is_canceled, si.phone,
si.receiver_name, si.district_code, si.address, si.remark, si.receiver_name, si.district_code, si.address, si.remark,
si.create_by, si.create_time, si.update_by, si.update_time, si.create_by, si.create_time, si.update_by, si.update_time,
su.username, su.name, su.phone_number, su.username, su.name, su.phone_number,
...@@ -515,4 +515,13 @@ ...@@ -515,4 +515,13 @@
from sys_indent from sys_indent
where indent_no = #{indentNo} where indent_no = #{indentNo}
</select> </select>
<select id="getIndentByExpressAndDeviceType" resultMap="BaseResultMap">
SELECT si.*
FROM sys_indent si
LEFT JOIN sys_indent_logistics sil ON sil.indent_id = si.id
WHERE sil.logistics_no = #{expressSn}
and si.device_type = #{deviceType}
and sil.logistics_unicode = #{expressCompany}
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from sys_logistics from sys_logistics
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -99,9 +99,9 @@ ...@@ -99,9 +99,9 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysLogistics" > <insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysLogistics" >
insert into sys_logistics (id, express_company, unicode, insert into sys_logistics (id, express_company, unicode,
charact_type) charact_type)
values (#{id,jdbcType=INTEGER}, #{expressCompany,jdbcType=VARCHAR}, #{unicode,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{expressCompany,jdbcType=VARCHAR}, #{unicode,jdbcType=VARCHAR},
#{charactType,jdbcType=CHAR}) #{charactType,jdbcType=CHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysLogistics" > <insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysLogistics" >
...@@ -202,4 +202,16 @@ ...@@ -202,4 +202,16 @@
BINARY charact_type, BINARY charact_type,
uniCODE ASC; uniCODE ASC;
</select> </select>
<select id="selectByExpressCompany" resultMap="BaseResultMap">
SELECT
*
FROM
sys_logistics
WHERE
express_company = #{expressCompany}
ORDER BY
BINARY charact_type,
uniCODE ASC;
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
<result column="address_code" jdbcType="INTEGER" property="addressCode" /> <result column="address_code" jdbcType="INTEGER" property="addressCode" />
<result column="IDCard" jdbcType="VARCHAR" property="idcard" /> <result column="IDCard" jdbcType="VARCHAR" property="idcard" />
<result column="bank_card_no" jdbcType="VARCHAR" property="bankCardNo" /> <result column="bank_card_no" jdbcType="VARCHAR" property="bankCardNo" />
<result column="bank_name" jdbcType="VARCHAR" property="bankName" /> <result column="bank_name" jdbcType="VARCHAR" property="bankName" />
<result column="generate_check_sheet" jdbcType="INTEGER" property="generateCheckSheet" /> <result column="generate_check_sheet" jdbcType="INTEGER" property="generateCheckSheet" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, user_id, mail, occupation, provider_name, address_detail, address_code, IDCard, id, user_id, mail, occupation, provider_name, address_detail, address_code, IDCard,
bank_card_no, bank_name, generate_check_sheet bank_card_no, bank_name, generate_check_sheet
</sql> </sql>
...@@ -29,23 +29,31 @@ ...@@ -29,23 +29,31 @@
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from sys_manager from sys_manager
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<select id="selectByProviderName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_manager
where provider_name=#{providerName}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_manager delete from sys_manager
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.user.SysManager" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.user.SysManager" useGeneratedKeys="true">
insert into sys_manager (user_id, mail, occupation, insert into sys_manager (user_id, mail, occupation,
provider_name, address_detail, address_code, provider_name, address_detail, address_code,
IDCard, bank_card_no, bank_name, IDCard, bank_card_no, bank_name,
generate_check_sheet) generate_check_sheet)
values (#{userId,jdbcType=INTEGER}, #{mail,jdbcType=VARCHAR}, #{occupation,jdbcType=VARCHAR}, values (#{userId,jdbcType=INTEGER}, #{mail,jdbcType=VARCHAR}, #{occupation,jdbcType=VARCHAR},
#{providerName,jdbcType=VARCHAR}, #{addressDetail,jdbcType=VARCHAR}, #{addressCode,jdbcType=INTEGER}, #{providerName,jdbcType=VARCHAR}, #{addressDetail,jdbcType=VARCHAR}, #{addressCode,jdbcType=INTEGER},
#{idcard,jdbcType=VARCHAR}, #{bankCardNo,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR}, #{bankCardNo,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR},
#{generateCheckSheet,jdbcType=INTEGER}) #{generateCheckSheet,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.user.SysManager" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glsx.ordercenter.pojo.user.SysManager" useGeneratedKeys="true">
...@@ -77,7 +85,7 @@ ...@@ -77,7 +85,7 @@
</if> </if>
<if test="bankName != null"> <if test="bankName != null">
bank_name, bank_name,
</if> </if>
<if test="generateCheckSheet != null"> <if test="generateCheckSheet != null">
generate_check_sheet, generate_check_sheet,
</if> </if>
...@@ -109,7 +117,7 @@ ...@@ -109,7 +117,7 @@
</if> </if>
<if test="bankName != null"> <if test="bankName != null">
#{bankName,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR},
</if> </if>
<if test="generateCheckSheet != null"> <if test="generateCheckSheet != null">
#{generateCheckSheet,jdbcType=INTEGER}, #{generateCheckSheet,jdbcType=INTEGER},
</if> </if>
...@@ -144,7 +152,7 @@ ...@@ -144,7 +152,7 @@
</if> </if>
<if test="bankName != null"> <if test="bankName != null">
bank_name = #{bankName,jdbcType=VARCHAR}, bank_name = #{bankName,jdbcType=VARCHAR},
</if> </if>
<if test="generateCheckSheet != null"> <if test="generateCheckSheet != null">
generate_check_sheet = #{generateCheckSheet,jdbcType=INTEGER}, generate_check_sheet = #{generateCheckSheet,jdbcType=INTEGER},
</if> </if>
...@@ -161,7 +169,7 @@ ...@@ -161,7 +169,7 @@
address_code = #{addressCode,jdbcType=INTEGER}, address_code = #{addressCode,jdbcType=INTEGER},
IDCard = #{idcard,jdbcType=VARCHAR}, IDCard = #{idcard,jdbcType=VARCHAR},
bank_card_no = #{bankCardNo,jdbcType=VARCHAR}, bank_card_no = #{bankCardNo,jdbcType=VARCHAR},
bank_name = #{bankName,jdbcType=VARCHAR}, bank_name = #{bankName,jdbcType=VARCHAR},
generate_check_sheet = #{generateCheckSheet,jdbcType=INTEGER} generate_check_sheet = #{generateCheckSheet,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<result column="mechanic_status" jdbcType="TINYINT" property="mechanicStatus"/> <result column="mechanic_status" jdbcType="TINYINT" property="mechanicStatus"/>
<result column="work_status" jdbcType="TINYINT" property="workStatus"/> <result column="work_status" jdbcType="TINYINT" property="workStatus"/>
<result column="generate_check_sheet" jdbcType="INTEGER" property="generateCheckSheet"/> <result column="generate_check_sheet" jdbcType="INTEGER" property="generateCheckSheet"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
...@@ -545,4 +546,13 @@ ...@@ -545,4 +546,13 @@
GROUP BY u.id GROUP BY u.id
order by timeliness is null, timeliness ASC order by timeliness is null, timeliness ASC
</select> </select>
<select id="selectByMechanicName" resultMap="BaseResultMap">
select
sm.id, sm.user_id, sm.district, sm.address, sm.work_time_start, sm.work_time_end, sm.dispatch_type, sm.service_type,
sm.IDCard, sm.mechanic_status
from sys_mechanic sm
left join sys_user su on sm.user_id = su.id
where su.name = #{mechanicName}
</select>
</mapper> </mapper>
...@@ -293,6 +293,14 @@ ...@@ -293,6 +293,14 @@
</where> </where>
</select> </select>
<select id="checkProviderAndMechanicMatch" resultMap="BaseResultMap">
SELECT su.*
FROM sys_service_mechanic ssm
LEFT JOIN sys_user su ON ssm.mechanic_id = su.id
WHERE ssm.service_id = #{providerUserId}
and ssm.mechanic_id = #{mechanicUserId}
</select>
<update id="updateActualPhoneNumberByUserId"> <update id="updateActualPhoneNumberByUserId">
UPDATE sys_user UPDATE sys_user
SET actual_phone_number = #{actualPhoneNumber} SET actual_phone_number = #{actualPhoneNumber}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!