Browse Source

小程序还款列表、还款计划详情、还款记录详情补充apifox完成

小程序密码登录接口开发、测试完成
小程序还款列表增加资方展示,接口测试、修改完成
获取小程序客户用户信息接口开发完成
调拨模块了解变更后需求,数据库表增加字段,调拨列表接口调整完成,调整apifox完成
解决孙经理家访考察填错后退后操作导致开票选择不到车问题完成,教孙经理正确退回方法
master
God 9 months ago
parent
commit
0efc677320
  1. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.java
  2. 3
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java
  3. 5
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java
  4. 5
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/app/AppSysUserFeign.java
  5. 5
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/app/AppSysUserFeignFallback.java
  6. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.java
  7. 16
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml
  8. 5
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java
  9. 47
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java
  10. 86
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/app/AppSysUserRest.java
  11. 11
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/wx/WxSysUserRest.java
  12. 8
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanRecord.java
  13. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java
  14. 8
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  15. 13
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java
  16. 8
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanRecord.java
  17. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java
  18. 21
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java
  19. 23
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBill.java
  20. 45
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java
  21. 2
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java
  22. 18
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml
  23. 13
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java
  24. 32
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java
  25. 137
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java
  26. 52
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java
  27. 32
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java
  28. 45
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java
  29. 2
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java
  30. 18
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml
  31. 13
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java
  32. 119
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java
  33. 52
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.java

@ -105,6 +105,6 @@ public interface BusSalesOrderBorrowerMapper extends BaseMapper<BusSalesOrderBor
int saveList(@Param("list") List<BusSalesOrderBorrower> list);
@Select("select sid from bus_sales_order_loancontract where customSid = #{customSid}")
@Select("select sid from bus_sales_order_borrower where customSid = #{customSid}")
String selectByCustomSid(String customSid);
}

3
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java

@ -276,4 +276,7 @@ public interface SysUserFeign {
@PostMapping(value = "/removeRedis")
ResultBean removeRedis();
@ApiOperation("获取小程序客户用户信息")
@GetMapping("/fetchBySidWx/{sid}")
public ResultBean<SysUser> fetchBySidWx(@PathVariable("sid") String sid);
}

5
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java

@ -260,4 +260,9 @@ public class SysUserFeignFallback implements SysUserFeign {
public ResultBean removeRedis() {
return null;
}
@Override
public ResultBean<SysUser> fetchBySidWx(String sid) {
return null;
}
}

5
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/app/AppSysUserFeign.java

@ -31,6 +31,11 @@ public interface AppSysUserFeign {
@ApiOperation(value = "1、app用户登录")
public ResultBean<SysUserVo> login(@RequestBody SysUserQuery sysUserQuery);
@PostMapping("/loginWx")
@ResponseBody
@ApiOperation(value = "小程序客户登录")
public ResultBean<SysUserVo> loginWx(@RequestBody SysUserQuery sysUserQuery);
@ApiOperation(value = "手机发送验证码(登录、修改密码、找回密码)")
@ResponseBody
@PostMapping("/sendVerificationCodeForApp")

5
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/app/AppSysUserFeignFallback.java

@ -21,6 +21,11 @@ public class AppSysUserFeignFallback implements AppSysUserFeign {
return new ResultBean<SysUserVo>().fail().setMsg("网站维护,请稍后再试");
}
@Override
public ResultBean<SysUserVo> loginWx(SysUserQuery sysUserQuery) {
return null;
}
@Override
public ResultBean sendVerificationCodeForApp(String mobile, String type, String appId) {
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.java

@ -200,4 +200,8 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
List<String> selectUserByStaffSid(@Param("list") List<String> staffList);
List<String> selectTokenList();
SysUser selectByUserNameWx(String userName);
SysUser selectByMobileWx(String userName);
}

16
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml

@ -416,4 +416,20 @@
left join sys_user su on su.staffSid = si.sid
where si.personTypeKey = '01' and length(su.token)>0
</select>
<select id="selectByUserNameWx" resultType="com.yxt.anrui.portal.api.sysuser.SysUser">
SELECT su.*
FROM sys_user su
where su.userName = #{userName}
and su.isDelete = 0
and su.userType = 2
</select>
<select id="selectByMobileWx" resultType="com.yxt.anrui.portal.api.sysuser.SysUser">
select su.*
from sys_user su
where su.mobile = #{mobile}
and su.isDelete = 0
and su.userType = 2
</select>
</mapper>

5
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java

@ -703,4 +703,9 @@ public class SysUserRest implements SysUserFeign {
public ResultBean removeRedis() {
return sysUserService.removeRedis();
}
@Override
public ResultBean<SysUser> fetchBySidWx(String sid) {
return sysUserService.fetchBySidWx(sid);
}
}

47
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java

@ -1533,4 +1533,51 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
}
return rb.success();
}
public SysUser selectByUserNameWx(String userName) {
return baseMapper.selectByUserNameWx(userName);
}
public SysUser selectByMobileWx(String userName) {
return baseMapper.selectByMobileWx(userName);
}
/**
* 小程序登录后设置token
*
* @param user
* @return
*/
public SysUserVo selectUserWx(SysUser user) {
String oldToken = user.getToken();
if (StringUtils.isNotBlank(oldToken)) {
redisUtil.remove(oldToken);
}
String uniqueToken = JWTUtil.create(user.getSid() + "");
String newToken = "Wx" + uniqueToken;
redisUtil.set(newToken, user.getUserName(), USERS_REDIS_SESSION_TL_App);
SysUserVo sysUserVo = new SysUserVo();
BeanUtil.copyProperties(user, sysUserVo);
sysUserVo.setToken(newToken);
// 更新用户中的token
updateToken(user.getSid(), newToken);
//查询是否需要更换密码
boolean isTrue = false;
String mobile = user.getMobile();
if (StringUtils.isNotBlank(mobile)) {
String password = mobile.substring(5, 11);
String md5 = Encodes.md5(password);
if (user.getPassword().equals(md5)) {
isTrue = true;
}
}
sysUserVo.setNeedResetPsd(isTrue);
return sysUserVo;
}
public ResultBean<SysUser> fetchBySidWx(String sid) {
ResultBean rb = ResultBean.fireFail();
SysUser sysUser = fetchBySid(sid);
return rb.success().setData(sysUser);
}
}

86
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/app/AppSysUserRest.java

@ -89,7 +89,7 @@ public class AppSysUserRest implements AppSysUserFeign {
// 访问后清理key
}
boolean isTest = false;
if(userQuery.getIsTest() != null){
if (userQuery.getIsTest() != null) {
isTest = userQuery.getIsTest();
}
isTest = true;
@ -217,6 +217,71 @@ public class AppSysUserRest implements AppSysUserFeign {
}
}
@Override
public ResultBean<SysUserVo> loginWx(SysUserQuery userQuery) {
/*
1根据传参设备appId查询绑定账号
11未查询到绑定的账号
111查询用户登录账号不存在-->返回账号不存在
112账号存在获取当前账号绑定的设备值
1设备值为空验证登录成功后即绑定设备返回用户信息验证不成功返回错误信息验证码密码错误
2设备值存在向表sys_exception_log插入数据返回当前账号已被其它设备绑定错误码101说明错误码为sys_exception_log的id
12查询到绑定的账号
121根据传参设备appId查询到绑定的账号与用户传递的账号不一致
1向表sys_exception_log插入数据返回当前设备已绑定其它账号错误码102
122根据传参设备appId查询到绑定的账号与用户传递的账号一致验证登录信息
1验证登录信息成功后返回用户信息验证不成功返回错误信息验证码密码错误
*/
ResultBean<SysUserVo> rb = ResultBean.fireFail();
String userName = userQuery.getUserName();
String password = userQuery.getPassword();
String verifyCode = userQuery.getVerifyCode();
String type = userQuery.getType(); // type:1、密码登录2、验证码登录
if (StringUtils.isBlank(userName)) return new ResultBean<SysUserVo>().fail().setMsg("用户名不能为空");
if (type.equals("1")) {
if (StringUtils.isBlank(password)) return new ResultBean<SysUserVo>().fail().setMsg("密码不能为空");
} else {
if (StringUtils.isBlank(verifyCode)) return new ResultBean<SysUserVo>().fail().setMsg("验证码不能为空");
// 访问后清理key
}
SysUser sysUser = sysUserService.selectByUserNameWx(userName);
if (sysUser == null) {
sysUser = sysUserService.selectByMobileWx(userName);
if (sysUser == null) {
return rb.setMsg("用户名或密码错误");
}
}
if (type.equals("1")) {
String md5 = Encodes.md5(password);
if (md5.equals(sysUser.getPassword())) {
SysUserVo sysUserVo = sysUserService.selectUserWx(sysUser);
if (sysUserVo == null) {
return rb.setMsg("用户名或密码错误");
}
insertLoginLogWx(sysUser);
return new ResultBean<SysUserVo>().success().setData(sysUserVo);
} else {
return new ResultBean<SysUserVo>().fail().setMsg("用户名或密码错误");
}
} else {
String codeFromRedis = redisUtil.get("loginCode" + userName);
if (StringUtils.isBlank(codeFromRedis))
return new ResultBean<SysUserVo>().fail().setMsg("短信验证码已失效,请重新发送");
if (verifyCode.equals(codeFromRedis.substring(0, 4))) {
SysUserVo sysUserVo = sysUserService.selectUserWx(sysUser);
if (sysUserVo == null) {
return rb.setMsg("用户名或密码错误");
}
redisUtil.remove("loginCode" + userName);
insertLoginLogWx(sysUser);
return new ResultBean<SysUserVo>().success().setData(sysUserVo);
} else {
return new ResultBean<SysUserVo>().fail().setMsg("短信验证码错误或已失效,请重新获取");
}
}
}
/**
* 插入登录日志
*
@ -233,6 +298,17 @@ public class AppSysUserRest implements AppSysUserFeign {
systemLogService.save(systemLog);
}
private void insertLoginLogWx(SysUser user) {
SystemLog systemLog = new SystemLog();
systemLog.setUserName(user.getUserName());
String ip = WebUtil.getIpAddr(httpServletRequest);
systemLog.setUserIp(ip);
systemLog.setEventUrl("portal/v1/appuser/loginWx");
systemLog.setEventContent("客户登录");
systemLog.setEventName("客户登录");
systemLogService.save(systemLog);
}
/**
* 手机发送短信验证码
*
@ -360,14 +436,14 @@ public class AppSysUserRest implements AppSysUserFeign {
}
String isAdmin = "";
SysUser sysUser = sysUserService.fetchBySid(userSid);
if(sysUser != null){
if (sysUser != null) {
isAdmin = sysUser.getIsAdmin();
}
if("1".equals(isAdmin)){
if ("1".equals(isAdmin)) {
String roleName = sysRoleService.selectByUserSid(userSid);
userInfo.setPosition(roleName);
}else{
} else {
//根据用户sid查询岗位
List<String> stringList = sysUserService.getPost(sysUserVo.getStaffSid());
stringList.removeAll(Collections.singleton(null));
@ -455,7 +531,7 @@ public class AppSysUserRest implements AppSysUserFeign {
@Override
public ResultBean selectAppHaveMessage(String menuSid, String orgPath) {
return sysUserService.selectAppHaveMessage(menuSid,orgPath);
return sysUserService.selectAppHaveMessage(menuSid, orgPath);
}

11
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/wx/WxSysUserRest.java

@ -8,6 +8,8 @@ import com.auth0.jwt.interfaces.DecodedJWT;
import com.yxt.anrui.crm.api.crmcustomer.CrmCustomer;
import com.yxt.anrui.crm.api.crmcustomer.CrmCustomerFeign;
import com.yxt.anrui.crm.api.crmcustomer.wx.WxCrmCustomerQuery;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysuser.SysUser;
import com.yxt.anrui.portal.api.sysuser.wx.*;
@ -64,6 +66,8 @@ public class WxSysUserRest implements WxSysUserFeign {
@Autowired
private CrmCustomerFeign crmCustomerFeign;
@Autowired
private CrmCustomerTempFeign crmCustomerTempFeign;
@Autowired
private SysOrganizationService sysOrganizationService;
@Autowired
private HttpServletRequest request;
@ -304,10 +308,11 @@ public class WxSysUserRest implements WxSysUserFeign {
}
boolean isHave = false;
WxHomePageVo wxHomePageVo = sysUserService.selectHomePage(userSid);
ResultBean<CrmCustomer> resultBean = crmCustomerFeign.selectBySid(wxHomePageVo.getStaffSid());
if (resultBean.getSuccess()) {
wxHomePageVo.setIdTerm(resultBean.getData().getEndDate());
if (wxHomePageVo == null){
wxHomePageVo = new WxHomePageVo();
}
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.selByMobile(sysUser.getMobile()).getData();
wxHomePageVo.setIdTerm(crmCustomerTempVo.getEndDate());
if (StringUtils.isBlank(wxHomePageVo.getHeadImage())) {
//默认头像
wxHomePageVo.setHeadImage("http://120.46.131.15:8111/upload/appImage/headImage.jpg");

8
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanRecord.java

@ -13,11 +13,11 @@ import lombok.Data;
public class AppRepaymentPlanRecord implements Vo {
@ApiModelProperty("月份期数")
private String date;
private String monthStr;
@ApiModelProperty("合计")
private String total;
private String totalStr;
@ApiModelProperty("月还")
private String yh;
private String monthlyPaymentStr;
@ApiModelProperty("其他融")
private String qtr;
private String otherMonthlyPaymentStr;
}

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java

@ -126,7 +126,7 @@ public interface LoanRepaymentScheduleFeign {
@ApiOperation("微信小程序还款计划列表")
@PostMapping("/getRepaymentPlanListWx")
@ResponseBody
ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(PagerQuery<AppRepaymentPlanQuery> pagerQuery);
ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(@RequestBody PagerQuery<AppRepaymentPlanQuery> pagerQuery);
@ApiOperation("微信小程序查看单车还款计划表")
@GetMapping("/getRepaymentPlanListByVinNoWx")

8
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -860,7 +860,7 @@
'(',
period,
')'
) AS 'date',
) AS monthStr,
(SELECT
dueMoney
FROM
@ -868,7 +868,7 @@
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
AND policyOrOther = '0'
AND a.period = c.period) AS yh,
AND a.period = c.period) AS monthlyPaymentStr,
(SELECT
dueMoney
FROM
@ -876,7 +876,7 @@
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
AND policyOrOther = '1'
AND b.period = c.period) AS qtr,
AND b.period = c.period) AS otherMonthlyPaymentStr,
(SELECT
dueMoney
FROM
@ -894,7 +894,7 @@
AND policyOrOther = '1'
AND b.period = c.period),
0
) AS total
) AS totalStr
FROM
loan_repayment_plan_details c
WHERE vinNo = #{vinNo}

13
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java

@ -30,6 +30,7 @@ import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUser;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank;
@ -6951,8 +6952,8 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
qw.eq("isDelete", 0);
qw.orderByDesc("createTime");
String userSid = pagerQuery.getUserSid();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.selByMobile(sysUserVo.getMobile()).getData();
SysUser sysUser = sysUserFeign.fetchBySidWx(userSid).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.selByMobile(sysUser.getMobile()).getData();
String borrSid = busSalesOrderBorrowerFeign.selectByCustomSid(crmCustomerTempVo.getSid()).getData();
qw.eq("borrowerSid", borrSid);
if (StringUtils.isNotBlank(pagerQuery.getNames())) {
@ -6991,7 +6992,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
appRepaymentPlanListDetailsWxVo.setOtherManagement(loanRepaymentPlanDetails.get(0).getBankName());
}
AppRepaymentPlanThead appRepaymentPlanThead4 = new AppRepaymentPlanThead();
appRepaymentPlanThead4.setName("qtr");
appRepaymentPlanThead4.setName("otherMonthlyPaymentStr");
String[] qtrDate = loanRepaymentSchedule.getOtherRepayDate().toString().split("-");
appRepaymentPlanThead4.setLabel("其他融(" + qtrDate[qtrDate.length - 1] + "日)");
appRepaymentPlanThead4.setWidth("100");
@ -7001,7 +7002,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
}
appRepaymentPlanListDetailsWxVo.setVinNo(vinNo);
AppRepaymentPlanThead appRepaymentPlanThead1 = new AppRepaymentPlanThead();
appRepaymentPlanThead1.setName("date");
appRepaymentPlanThead1.setName("monthStr");
appRepaymentPlanThead1.setLabel("月份(期数)");
appRepaymentPlanThead1.setFixed(true);
appRepaymentPlanThead1.setWidth("120");
@ -7009,14 +7010,14 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
appRepaymentPlanThead1.setAlign("center");
appRepaymentPlanTheads.add(appRepaymentPlanThead1);
AppRepaymentPlanThead appRepaymentPlanThead2 = new AppRepaymentPlanThead();
appRepaymentPlanThead2.setName("total");
appRepaymentPlanThead2.setName("totalStr");
appRepaymentPlanThead2.setLabel("合计");
appRepaymentPlanThead2.setWidth("100");
appRepaymentPlanThead2.setEmptyString("-");
appRepaymentPlanThead2.setAlign("center");
appRepaymentPlanTheads.add(appRepaymentPlanThead2);
AppRepaymentPlanThead appRepaymentPlanThead3 = new AppRepaymentPlanThead();
appRepaymentPlanThead3.setName("yh");
appRepaymentPlanThead3.setName("monthlyPaymentStr");
String[] zcpDate = loanRepaymentSchedule.getMainRepayDate().toString().split("-");
appRepaymentPlanThead3.setLabel("月还(" + zcpDate[zcpDate.length - 1] + "日)");
appRepaymentPlanThead3.setWidth("100");

8
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanRecord.java

@ -13,11 +13,11 @@ import lombok.Data;
public class RepaymentPlanRecord implements Vo {
@ApiModelProperty("月份期数")
private String date;
private String monthStr;
@ApiModelProperty("合计")
private String total;
private String totalStr;
@ApiModelProperty("月还")
private String yh;
private String monthlyPaymentStr;
@ApiModelProperty("其他融")
private String qtr;
private String otherMonthlyPaymentStr;
}

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java

@ -24,6 +24,8 @@ public class RepaymentPlanWxVo implements Vo {
private String financial;
@ApiModelProperty("销售专员")
private String salesName;
@ApiModelProperty("资方")
private String managementName;
@ApiModelProperty("车辆信息")
private List<RepaymentPlanVehWxVo> repaymentPlanVehWxVoList;
}

21
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java

@ -76,21 +76,28 @@ public class RepaymentPlanService {
ResultBean<PagerVo<AppRepaymentPlanVo>> repaymentPlanList = loanRepaymentScheduleFeign.getRepaymentPlanListWx(pagerQuery);
if (repaymentPlanList.getSuccess()) {
PagerVo<AppRepaymentPlanVo> data = repaymentPlanList.getData();
BeanUtil.copyProperties(data, pagerVo);
List<RepaymentPlanVehWxVo> vehWxVos = new ArrayList<>();
for (AppRepaymentPlanVo record : data.getRecords()) {
String vinNo = record.getVinNo();
List<AppRepaymentPlanVo> records1 = data.getRecords();
List<RepaymentPlanWxVo> records2 = new ArrayList<>();
for (AppRepaymentPlanVo appRepaymentPlanVo : records1) {
RepaymentPlanWxVo repaymentPlanWxVo = new RepaymentPlanWxVo();
repaymentPlanWxVo.setSid(appRepaymentPlanVo.getSid());
repaymentPlanWxVo.setContractId(appRepaymentPlanVo.getContractId());
repaymentPlanWxVo.setFinancial(appRepaymentPlanVo.getFinancial());
repaymentPlanWxVo.setLenderName(appRepaymentPlanVo.getLenderName());
repaymentPlanWxVo.setSalesName(appRepaymentPlanVo.getSalesName());
repaymentPlanWxVo.setManagementName(appRepaymentPlanVo.getManagementName());
String vinNo = appRepaymentPlanVo.getVinNo();
String[] vinNos = vinNo.split(",");
for (String no : vinNos) {
RepaymentPlanVehWxVo repaymentPlanVehWxVo = new RepaymentPlanVehWxVo();
repaymentPlanVehWxVo.setVinNo(no);
vehWxVos.add(repaymentPlanVehWxVo);
}
repaymentPlanWxVo.setRepaymentPlanVehWxVoList(vehWxVos);
records2.add(repaymentPlanWxVo);
}
List<RepaymentPlanWxVo> records = pagerVo.getRecords();
for (RepaymentPlanWxVo record : records) {
record.setRepaymentPlanVehWxVoList(vehWxVos);
}
pagerVo.setRecords(records2);
}
return rb.success().setData(pagerVo);
}

23
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBill.java

@ -1,8 +1,8 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebill;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ -15,11 +15,13 @@ import java.util.Date;
public class WmsInventoryAllocateBill extends BaseEntity {
private String billNo;//单据编号
private String createDate;//制单日期
private String createUserSid;//制单人sid
private String createByName;//制单人姓名
private String outOrgSid;//调出分公司sid
private String outOrgName;//调出分公司
private String deptSid;//申请部门sid
private String deptName;//申请部门名称
private String outPlatSid;//调出站sid
private String outPlatName;//调出站名称
private String inPlatSid;//调入站sid
private String inPlatName;//调入站名称
private String inOrgSid;//调入分公司sid
private String inOrgName;//调入分公司
private String count;//调拨数量
@ -28,7 +30,16 @@ public class WmsInventoryAllocateBill extends BaseEntity {
private String confirmName;//确认人姓名
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date finishTime;//完成时间
private String useOrgSid;//使用组织sid
@ApiModelProperty("流程定义的id")
private String procDefId; // 流程定义的id
@ApiModelProperty("环节定义的sid")
private String nodeId; // 环节定义的sid
@ApiModelProperty("流程实例的sid")
private String procInstId; // 流程实例的sid
@ApiModelProperty("流程状态")
private String nodeState; // 流程状态
@ApiModelProperty("任务id")
private String taskId; // 任务id
private String createOrgSid;//创建组织sid
private String createOrgName;//创建组织名称

45
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java

@ -1,45 +0,0 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebill;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/2/26 13:38
*/
@Data
public class WmsInventoryAllocateBillDto implements Dto {
private String id;
private String sid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
private String goodsID;//商品ID(唯一编码,入库时生成)
private String goodsSid;//商品sid
private String billSid;//入库单sid
private String billDetailSid;//入库单明细sid
private String price1;//销售价格1
private String price2;//销售价格2
private String price3;//销售价格3
private String price4;//销售价格4
private String price5;//销售价格5
private String unit;//计量单位
private String count;//库存数量
private String minimumPrice;//销售底价
private String freePrice;//三包价格
private String firstMaintainPrice;//首保价格
private String warehouseSid;//仓库sid
private String warehouseName;//仓库名称
private String warehouseArea;//货位
private String isShowDiscount;//是否显示折扣标志
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date firstInDate;//首次入库日期-计算库龄的依据
private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库
private String sortNo;//排序
private String useOrgSid;//使用组织sid
private String createOrgSid;//创建组织sid
}

2
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java

@ -14,8 +14,6 @@ import org.apache.ibatis.annotations.Update;
*/
@Mapper
public interface WmsInventoryAllocateBillMapper extends BaseMapper<WmsInventoryAllocateBill> {
IPage<WmsInventoryAllocateBillVo> listPage(IPage<WmsInventoryAllocateBill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsInventoryAllocateBill> qw);
WmsInventoryAllocateBillVo initialization (@Param("sid") String sid);
IPage<WmsInventoryAllocateBillVoNew> selectPageVo(IPage<WmsInventoryAllocateBill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsInventoryAllocateBill> qw);

18
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml

@ -3,24 +3,6 @@
<mapper namespace="com.yxt.wms.biz.inventory.wmsinventoryallocatebill.WmsInventoryAllocateBillMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="listPage" resultType="com.yxt.wms.biz.inventory.wmsinventoryallocatebill.WmsInventoryAllocateBillVo">
select
a.*,b.goodsName as goodsName
from wms_inventory_allocate_bill a
left join wms_goods b on b.sid =a.goodsSid
<where>
${ew.sqlSegment}
</where>
</select>
<select id="initialization" resultType="com.yxt.wms.biz.inventory.wmsinventoryallocatebill.WmsInventoryAllocateBillVo">
select
a.*,b.goodsName as goodsName
from wms_inventory_allocate_bill a
left join wms_goods b on b.sid =a.goodsSid
where a.sid =#{sid}
</select>
<select id="selectPageVo"
resultType="com.yxt.wms.biz.inventory.wmsinventoryallocatebill.WmsInventoryAllocateBillVoNew">
select * from wms_inventory_allocate_bill

13
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java

@ -1,13 +0,0 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebill;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author wangpengfei
* @date 2024/2/26 13:37
*/
@Data
public class WmsInventoryAllocateBillQuery implements Query {
private String name;
}

32
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java

@ -15,16 +15,28 @@ import java.util.Date;
@Data
public class WmsInventoryAllocateBillQueryNew implements Query {
@ApiModelProperty("创建开始日期")
@ApiModelProperty("调出分公司")
private String outOrgName;
@ApiModelProperty("申请部门")
private String deptName;
@ApiModelProperty("申请人")
private String createByName;
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("单据开始日期")
private String createStartTime;
@ApiModelProperty("创建结束日期")
@ApiModelProperty("单据结束日期")
private String createEndTime;
@ApiModelProperty("门店")
private String createOrgSid;
@ApiModelProperty("状态")
private String state;
@ApiModelProperty("单据范围")
private String billFW;
@ApiModelProperty("其他查询条件")
private String otherQuery;
@ApiModelProperty("办结开始日期")
private String finishStartTime;
@ApiModelProperty("办结结束日期")
private String finishEndTime;
@ApiModelProperty("调出站")
private String outPlatName;
@ApiModelProperty("调入分公司")
private String inOrgName;
@ApiModelProperty("调入站")
private String inPlatName;
@ApiModelProperty("经办人")
private String confirmName;
}

137
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java

@ -35,116 +35,47 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
public ResultBean<PagerVo<WmsInventoryAllocateBillVo>> listPage(PagerQuery<WmsInventoryAllocateBillQuery> pq) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillQuery query = pq.getParams();
QueryWrapper<WmsInventoryAllocateBill> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(query.getName())) {
qw.like("rackName", query.getName());
}
IPage<WmsInventoryAllocateBill> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryAllocateBillVo> pagging = baseMapper.listPage(page, qw);
PagerVo<WmsInventoryAllocateBillVo> p = PagerUtil.pageToVo(pagging, null);
List<WmsInventoryAllocateBillVo> records = pagging.getRecords();
return rb.success().setData(p);
}
public PagerVo<WmsInventoryAllocateBillVoNew> listPageVo(PagerQuery<WmsInventoryAllocateBillQueryNew> pq) {
WmsInventoryAllocateBillQueryNew query = pq.getParams();
QueryWrapper<WmsInventoryAllocateBill> qw = new QueryWrapper<>();
IPage<WmsInventoryAllocateBill> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryAllocateBillVoNew> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<WmsInventoryAllocateBillVoNew> p = PagerUtil.pageToVo(pagging, null);
return p;
}
/**
* 入库
* @param dto
* @return
*/
// public ResultBean<WmsInventoryAllocateBill> warehousing(WmsInventoryAllocateBillDto dto) {
// ResultBean rb = ResultBean.fireFail();
// WmsInventoryAllocateBill wmsInventory=baseMapper.selectOne(new QueryWrapper<WmsInventoryAllocateBill>().eq("goodsSid",dto.getGoodsSid()).eq("warehouseSid",dto.getWarehouseSid()));
// if(null==wmsInventory){
// WmsInventoryAllocateBill wms=new WmsInventoryAllocateBill();
// BeanUtil.copyProperties(dto,wms,"sid","id");
// wms.setFirstInDate(new Date());
// baseMapper.insert(wms);
// return rb.success().setData(wms);
// }else{
// wmsInventory.setCount(String.valueOf(Double.valueOf(dto.getCount())+Double.valueOf(wmsInventory.getCount())));
// baseMapper.updateById(wmsInventory);
// }
// return rb.success().setData(wmsInventory);
// }
/**
* 出库
*
* @param dto
* @return
*/
public ResultBean<WmsInventoryAllocateBill> outWarehousing(WmsInventoryAllocateBillDto dto) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBill wmsInventory = baseMapper.selectOne(new QueryWrapper<WmsInventoryAllocateBill>().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid()));
double exisInventory = Double.valueOf(wmsInventory.getCount());
double out = Double.valueOf(dto.getCount());
if (null == wmsInventory) {
return rb.setMsg("此仓库没有相应的商品库存");
if (StringUtils.isNotBlank(query.getOutOrgName())){
qw.like("createOrgName",query.getOutOrgName());
}
if (exisInventory < -out) {
return rb.setMsg("库存不足");
if (StringUtils.isNotBlank(query.getDeptName())){
qw.like("deptName",query.getDeptName());
}
wmsInventory.setCount(String.valueOf(exisInventory + out));
baseMapper.updateById(wmsInventory);
return rb.success().setData(wmsInventory);
}
public ResultBean<String> saveOrUpdate(WmsInventoryAllocateBillDto dto) {
ResultBean rb = ResultBean.fireFail();
String sid = "";
if (StringUtils.isNotBlank(dto.getSid())) {
sid = dto.getSid();
WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(dto.getSid());
BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid");
baseMapper.updateById(wmsWarehouseRack);
} else {
WmsInventoryAllocateBill wmsWarehouseRack = new WmsInventoryAllocateBill();
sid = wmsWarehouseRack.getSid();
BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid");
wmsWarehouseRack.setCreateTime(new DateTime());
baseMapper.insert(wmsWarehouseRack);
if (StringUtils.isNotBlank(query.getCreateByName())){
qw.like("createByName",query.getCreateByName());
}
return rb.success().setMsg("成功");
}
public ResultBean<WmsInventoryAllocateBillVo> initialization(String sid) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillVo vo = baseMapper.initialization(sid);
return rb.success().setData(vo);
}
public ResultBean delete(String sid) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(sid);
if (null != wmsWarehouseRack) {
baseMapper.deleteById(wmsWarehouseRack.getId());
if (StringUtils.isNotBlank(query.getBillNo())){
qw.like("billNo",query.getBillNo());
}
return rb.success();
}
public ResultBean updateIsEnable(String sid, String isEnable) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(sid);
if (null != wmsWarehouseRack) {
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable));
baseMapper.updateById(wmsWarehouseRack);
if (StringUtils.isNotBlank(query.getOutPlatName())){
qw.like("outPlatName",query.getOutPlatName());
}
return rb.success().setMsg("成功");
if (StringUtils.isNotBlank(query.getInOrgName())){
qw.like("inOrgName",query.getInOrgName());
}
if (StringUtils.isNotBlank(query.getInPlatName())){
qw.like("inPlatName",query.getInPlatName());
}
if (StringUtils.isNotBlank(query.getConfirmName())){
qw.like("confirmName",query.getConfirmName());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String finishStartTime = query.getFinishStartTime();
String finishEndTime = query.getFinishEndTime();
qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(finishStartTime), "date_format (finishTime,'%Y-%m-%d') >= date_format('" + finishStartTime + "','%Y-%m-%d')").
apply(org.apache.commons.lang3.StringUtils.isNotEmpty(finishEndTime), "date_format (finishTime,'%Y-%m-%d') <= date_format('" + finishEndTime + "','%Y-%m-%d')"
);
IPage<WmsInventoryAllocateBill> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryAllocateBillVoNew> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<WmsInventoryAllocateBillVoNew> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public WmsInventoryAllocateBillDetailsVoNew fetchDetailsVoBySid(String sid) {
@ -184,7 +115,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven
String sid = this.insertByDto(dto);
for (WmsInventoryAllocateBillDetailDtoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocateBillDetailNewList) {
wmsInventoryAllocateBillDetailDtoNew.setBillSid(sid);
wmsInventoryAllocateBillDetailService.saveOrUpdateDto(wmsInventoryAllocateBillDetailDtoNew);
wmsInventoryAllocateBillDetailService.insertByDto(wmsInventoryAllocateBillDetailDtoNew);
}
return sid;
}

52
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java

@ -1,52 +0,0 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebill;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/2/26 13:37
*/
@Data
public class WmsInventoryAllocateBillVo implements Vo {
private String id;
private String sid;
private String lockVersion;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date modifyTime;
private String remarks;
private String isEnable;
private String state;
private String isDelete;
private String goodsID;//商品ID(唯一编码,入库时生成)
private String goodsSid;//商品sid
private String billSid;//入库单sid
private String billDetailSid;//入库单明细sid
private String price1;//销售价格1
private String price2;//销售价格2
private String price3;//销售价格3
private String price4;//销售价格4
private String price5;//销售价格5
private String unit;//计量单位
private String count;//库存数量
private String minimumPrice;//销售底价
private String freePrice;//三包价格
private String firstMaintainPrice;//首保价格
private String warehouseSid;//仓库sid
private String warehouseName;//仓库名称
private String warehouseArea;//货位
private String isShowDiscount;//是否显示折扣标志
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date firstInDate;//首次入库日期-计算库龄的依据
private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库
private String sortNo;//排序
private String useOrgSid;//使用组织sid
private String createOrgSid;//创建组织sid
private String goodsName;
}

32
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java

@ -31,26 +31,28 @@ public class WmsInventoryAllocateBillVoNew implements Vo {
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("制单人姓名")
@ApiModelProperty("分公司")
private String createOrgName;
@ApiModelProperty("申请部门")
private String deptName;
@ApiModelProperty("申请人")
private String createByName;
@ApiModelProperty("制单日期")
private String createDate;
@ApiModelProperty("完成标志")
private String state;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@ApiModelProperty("完成时间")
@ApiModelProperty("申请日期")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@ApiModelProperty("办结日期")
private Date finishTime;
@ApiModelProperty("调出门店")
private String outOrgName;
@ApiModelProperty("调入门店")
@ApiModelProperty("调出")
private String outPlatName;
@ApiModelProperty("调入分公司")
private String inOrgName;
@ApiModelProperty("调入站")
private String inPlatName;
@ApiModelProperty("经办人")
private String confirmName;
@ApiModelProperty("调拨数量")
private BigDecimal count;
@ApiModelProperty("调拨金额")
private BigDecimal amount;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("门店")
private String createOrgName;
}

45
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java

@ -1,45 +0,0 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/2/26 13:38
*/
@Data
public class WmsInventoryAllocateBillDetailDto implements Dto {
private String id;
private String sid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
private String goodsID;//商品ID(唯一编码,入库时生成)
private String goodsSid;//商品sid
private String billSid;//入库单sid
private String billDetailSid;//入库单明细sid
private String price1;//销售价格1
private String price2;//销售价格2
private String price3;//销售价格3
private String price4;//销售价格4
private String price5;//销售价格5
private String unit;//计量单位
private String count;//库存数量
private String minimumPrice;//销售底价
private String freePrice;//三包价格
private String firstMaintainPrice;//首保价格
private String warehouseSid;//仓库sid
private String warehouseName;//仓库名称
private String warehouseArea;//货位
private String isShowDiscount;//是否显示折扣标志
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date firstInDate;//首次入库日期-计算库龄的依据
private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库
private String sortNo;//排序
private String useOrgSid;//使用组织sid
private String createOrgSid;//创建组织sid
}

2
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java

@ -17,8 +17,6 @@ import java.util.List;
*/
@Mapper
public interface WmsInventoryAllocateBillDetailMapper extends BaseMapper<WmsInventoryAllocateBillDetail> {
IPage<WmsInventoryAllocateBillDetailVo> listPage(IPage<WmsInventoryAllocateBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<WmsInventoryAllocateBillDetail> qw);
WmsInventoryAllocateBillDetailVo initialization (@Param("sid") String sid);
@Delete("delete from wms_inventory_allocate_bill_detail where billSid = #{billSid}")
void delByMainSid(String billSid);

18
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml

@ -3,24 +3,6 @@
<mapper namespace="com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="listPage" resultType="com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailVo">
select
a.*,b.goodsName as goodsName
from wms_inventory_allocate_bill_detail a
left join wms_goods b on b.sid =a.goodsSid
<where>
${ew.sqlSegment}
</where>
</select>
<select id="initialization" resultType="com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailVo">
select
a.*,b.goodsName as goodsName
from wms_inventory_allocate_bill_detail a
left join wms_goods b on b.sid =a.goodsSid
where a.sid =#{sid}
</select>
<select id="selByMainSid"
resultType="com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailDetailsVoNew">
SELECT

13
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java

@ -1,13 +0,0 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author wangpengfei
* @date 2024/2/26 13:37
*/
@Data
public class WmsInventoryAllocateBillDetailQuery implements Query {
private String name;
}

119
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java

@ -22,109 +22,6 @@ import java.util.List;
@Service
public class WmsInventoryAllocateBillDetailService extends MybatisBaseService<WmsInventoryAllocateBillDetailMapper, WmsInventoryAllocateBillDetail> {
public ResultBean<PagerVo<WmsInventoryAllocateBillDetailVo>> listPage(PagerQuery<WmsInventoryAllocateBillDetailQuery> pq) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillDetailQuery query = pq.getParams();
QueryWrapper<WmsInventoryAllocateBillDetail> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(query.getName())) {
qw.like("rackName", query.getName());
}
IPage<WmsInventoryAllocateBillDetail> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryAllocateBillDetailVo> pagging = baseMapper.listPage(page, qw);
PagerVo<WmsInventoryAllocateBillDetailVo> p = PagerUtil.pageToVo(pagging, null);
List<WmsInventoryAllocateBillDetailVo> records = pagging.getRecords();
return rb.success().setData(p);
}
/**
* 入库
* @param dto
* @return
*/
// public ResultBean<WmsInventoryAllocateBillDetail> warehousing(WmsInventoryAllocateBillDetailDto dto) {
// ResultBean rb = ResultBean.fireFail();
// WmsInventoryAllocateBillDetail wmsInventory=baseMapper.selectOne(new QueryWrapper<WmsInventoryAllocateBillDetail>().eq("goodsSid",dto.getGoodsSid()).eq("warehouseSid",dto.getWarehouseSid()));
// if(null==wmsInventory){
// WmsInventoryAllocateBillDetail wms=new WmsInventoryAllocateBillDetail();
// BeanUtil.copyProperties(dto,wms,"sid","id");
// wms.setFirstInDate(new Date());
// baseMapper.insert(wms);
// return rb.success().setData(wms);
// }else{
// wmsInventory.setCount(String.valueOf(Double.valueOf(dto.getCount())+Double.valueOf(wmsInventory.getCount())));
// baseMapper.updateById(wmsInventory);
// }
// return rb.success().setData(wmsInventory);
// }
/**
* 出库
*
* @param dto
* @return
*/
public ResultBean<WmsInventoryAllocateBillDetail> outWarehousing(WmsInventoryAllocateBillDetailDto dto) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillDetail wmsInventory = baseMapper.selectOne(new QueryWrapper<WmsInventoryAllocateBillDetail>().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid()));
double exisInventory = Double.valueOf(wmsInventory.getCount());
double out = Double.valueOf(dto.getCount());
if (null == wmsInventory) {
return rb.setMsg("此仓库没有相应的商品库存");
}
if (exisInventory < -out) {
return rb.setMsg("库存不足");
}
wmsInventory.setCount(String.valueOf(exisInventory + out));
baseMapper.updateById(wmsInventory);
return rb.success().setData(wmsInventory);
}
public ResultBean<String> saveOrUpdate(WmsInventoryAllocateBillDetailDto dto) {
ResultBean rb = ResultBean.fireFail();
String sid = "";
if (StringUtils.isNotBlank(dto.getSid())) {
sid = dto.getSid();
WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(dto.getSid());
BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid");
baseMapper.updateById(wmsWarehouseRack);
} else {
WmsInventoryAllocateBillDetail wmsWarehouseRack = new WmsInventoryAllocateBillDetail();
sid = wmsWarehouseRack.getSid();
BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid");
wmsWarehouseRack.setCreateTime(new DateTime());
baseMapper.insert(wmsWarehouseRack);
}
return rb.success().setMsg("成功");
}
public ResultBean<WmsInventoryAllocateBillDetailVo> initialization(String sid) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillDetailVo vo = baseMapper.initialization(sid);
return rb.success().setData(vo);
}
public ResultBean delete(String sid) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(sid);
if (null != wmsWarehouseRack) {
baseMapper.deleteById(wmsWarehouseRack.getId());
}
return rb.success();
}
public ResultBean updateIsEnable(String sid, String isEnable) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(sid);
if (null != wmsWarehouseRack) {
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable));
baseMapper.updateById(wmsWarehouseRack);
}
return rb.success().setMsg("成功");
}
public void delByMainSid(String billSid) {
baseMapper.delByMainSid(billSid);
}
@ -133,15 +30,6 @@ public class WmsInventoryAllocateBillDetailService extends MybatisBaseService<Wm
return baseMapper.selByMainSid(billSid);
}
public void saveOrUpdateDto(WmsInventoryAllocateBillDetailDtoNew dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(WmsInventoryAllocateBillDetailDtoNew dto) {
WmsInventoryAllocateBillDetail entity = new WmsInventoryAllocateBillDetail();
BeanUtil.copyProperties(dto, entity, "id", "sid");
@ -155,11 +43,4 @@ public class WmsInventoryAllocateBillDetailService extends MybatisBaseService<Wm
entity.setWarehouseRackCode(dto.getInWarehouseRackCode());
baseMapper.insert(entity);
}
public void updateByDto(WmsInventoryAllocateBillDetailDtoNew dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
}
}

52
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java

@ -1,52 +0,0 @@
package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/2/26 13:37
*/
@Data
public class WmsInventoryAllocateBillDetailVo implements Vo {
private String id;
private String sid;
private String lockVersion;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date modifyTime;
private String remarks;
private String isEnable;
private String state;
private String isDelete;
private String goodsID;//商品ID(唯一编码,入库时生成)
private String goodsSid;//商品sid
private String billSid;//入库单sid
private String billDetailSid;//入库单明细sid
private String price1;//销售价格1
private String price2;//销售价格2
private String price3;//销售价格3
private String price4;//销售价格4
private String price5;//销售价格5
private String unit;//计量单位
private String count;//库存数量
private String minimumPrice;//销售底价
private String freePrice;//三包价格
private String firstMaintainPrice;//首保价格
private String warehouseSid;//仓库sid
private String warehouseName;//仓库名称
private String warehouseArea;//货位
private String isShowDiscount;//是否显示折扣标志
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date firstInDate;//首次入库日期-计算库龄的依据
private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库
private String sortNo;//排序
private String useOrgSid;//使用组织sid
private String createOrgSid;//创建组织sid
private String goodsName;
}
Loading…
Cancel
Save