@@ -93,7 +93,12 @@ public class CustomerAddress implements Serializable {
* 是否已签收0未签收,1已签收
*/
@TableField("is_sign_for")
- private String isSignFor;
+ private Integer isSignFor;
+ /**
+ * 提交签收凭证操作人
+ */
+ @TableField("sign_for_user")
+ private Long signForUser;
/**
* 快递图片
@@ -17,4 +17,6 @@ public interface ICustomerAddressService extends IService<CustomerAddress> {
void setTrackingNumByRepairId(String repairId, Integer getType, String sendTrackingNum);
CustomerAddress getByRepairId(String repairId);
+
+ void setTrackingImgByRepairId(String repairId, JSONArray trackingImg,Long userId);
}
@@ -33,6 +33,20 @@ public class CustomerAddressServiceImpl extends ServiceImpl<ICustomerAddressMapp
@Override
+ public void setTrackingImgByRepairId(String repairId, JSONArray trackingImg,Long userId) {
+ LambdaUpdateWrapper<CustomerAddress> wrapper = new LambdaUpdateWrapper<>();
+ wrapper.eq(CustomerAddress::getRepairId,repairId);
+ wrapper.set(CustomerAddress::getIsSignFor,1);
+ if(trackingImg != null && !trackingImg.isEmpty()){
+ wrapper.set(CustomerAddress::getGetTrackingNum,trackingImg);
+ }
+ if(userId != null ){
+ wrapper.set(CustomerAddress::getSignForUser,userId);
+ this.update(wrapper);
+ @Override
public CustomerAddress getByRepairId(String repairId) {
LambdaQueryWrapper<CustomerAddress> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CustomerAddress::getRepairId,repairId);
@@ -338,5 +338,13 @@ public class RepairSaleService {
public void signFor(PayRegisterParam param, Long userId) {
+ if(StringUtils.isBlank(param.getRepairId()) || param.getTrackingImg() == null || param.getTrackingImg().isEmpty()){
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+ Repair repair = repairService.getById(param.getRepairId());
+ if(repair == null){
+ throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
+ customerAddressService.setTrackingImgByRepairId(repair.getRepairId(),param.getTrackingImg(),userId);
@@ -41,6 +41,7 @@ public class RepairerVo extends Repair {
private Integer sendType;
private String sendTrackingNum;
* 相关图片
@@ -55,7 +56,6 @@ public class RepairerVo extends Repair {
return payImgArray;
- private Integer isSignFor;
private String sendTrackingImg;
private JSONArray sendTrackingImgArray;
@@ -5,7 +5,7 @@
<select id="saleOrderList" resultType="com.fdkankan.sale.vo.response.RepairerVo">
select distinct r.* ,rr.check_result,c.customer_name,c.company_name, cd.send_type,cd.send_tracking_num,
- o.sys_user_id as saleId,rr.sys_user_id as repairManId
+ o.sys_user_id as saleId,rr.sys_user_id as repairManId,cd.is_sign_for
from t_repair r
left join t_order_receiving o on r.repair_id = o.repair_id
left join t_repair_register rr on r.repair_id = rr.repair_id