1、请领单pad接口 post操作类接口增加日志@AutoLog
2、移除请领车物料入参调整:改为根据nuid+elderid+wlid移除 3、请领单作废、回退、出库、确认收货成功时返回单据最新数据 4、pad接口-退货单-退货指令列表查询 5、pad接口-退货单-护理单元物料库存查询 6、pad接口-退货单-退货车添加物料
This commit is contained in:
parent
720549e542
commit
379b7332b0
|
|
@ -6,6 +6,7 @@ import com.nu.modules.invoicing.api.IQinglingApi;
|
|||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -88,6 +89,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-购物车-添加", notes = "请领单-购物车-添加")
|
||||
@AutoLog(value = "请领单-购物车-添加")
|
||||
@PostMapping(value = "/addGwc")
|
||||
public Result<?> addGwc(@RequestBody InvoicingQldGwcEntity dto) {
|
||||
boolean result = qinglingApi.addGwc(dto);
|
||||
|
|
@ -106,6 +108,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-购物车-移除物料", notes = "请领单-购物车-移除物料")
|
||||
@AutoLog(value = "请领单-购物车-移除物料")
|
||||
@PostMapping(value = "/deleteGwcWl")
|
||||
public Result<?> deleteGwcWl(@RequestBody InvoicingQldQueryEntity queryDto) {
|
||||
boolean result = qinglingApi.deleteGwcWl(queryDto);
|
||||
|
|
@ -124,6 +127,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-移除物料", notes = "请领单-移除物料")
|
||||
@AutoLog(value = "请领单-移除物料")
|
||||
@PostMapping(value = "/deleteQldWl")
|
||||
public Result<?> deleteQldWl(@RequestBody InvoicingQldQueryEntity queryDto) {
|
||||
boolean result = qinglingApi.deleteQldWl(queryDto);
|
||||
|
|
@ -142,6 +146,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-购物车-清空", notes = "请领单-购物车-清空")
|
||||
@AutoLog(value = "请领单-购物车-清空")
|
||||
@PostMapping(value = "/removeAllGwc")
|
||||
public Result<?> removeAllGwc(@RequestBody InvoicingQldQueryEntity queryDto) {
|
||||
boolean result = qinglingApi.removeAllGwc(queryDto);
|
||||
|
|
@ -160,6 +165,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-物料-置顶/取消置顶", notes = "请领单物料-置顶/取消置顶")
|
||||
@AutoLog(value = "请领单-物料-置顶/取消置顶")
|
||||
@PostMapping(value = "/wlzd")
|
||||
public Result<?> wlzd(@RequestBody InvoicingQldQueryEntity queryDto) {
|
||||
boolean result = qinglingApi.wlzd(queryDto);
|
||||
|
|
@ -209,6 +215,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-提交请领单", notes = "请领单-提交请领单")
|
||||
@AutoLog(value = "请领单-提交请领单")
|
||||
@PostMapping(value = "/submitQld")
|
||||
public Result<?> submitQld(@RequestBody InvoicingQldGwcEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
|
|
@ -255,6 +262,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-作废", notes = "请领单-作废")
|
||||
@AutoLog(value = "请领单-作废")
|
||||
@PostMapping(value = "/cancellation")
|
||||
public Result<?> cancellation(@RequestBody InvoicingQldMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
|
|
@ -262,7 +270,7 @@ public class InvoicingQldApi {
|
|||
}
|
||||
boolean result = qinglingApi.cancellation(dto);
|
||||
if (result) {
|
||||
return Result.OK("作废成功");
|
||||
return Result.OK(qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
} else {
|
||||
return Result.error("作废失败");
|
||||
}
|
||||
|
|
@ -275,6 +283,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-单子改为已读", notes = "请领单-单子改为已读")
|
||||
@AutoLog(value = "请领单-单子改为已读")
|
||||
@PostMapping(value = "/transRead")
|
||||
public Result<?> transRead(@RequestBody InvoicingQldMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getQldNo()) || StringUtils.isBlank(dto.getStatus())) {
|
||||
|
|
@ -295,6 +304,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-确认收货", notes = "请领单-确认收货")
|
||||
@AutoLog(value = "请领单-确认收货")
|
||||
@PostMapping(value = "/confirmReceipt")
|
||||
public Result<?> confirmReceipt(@RequestBody InvoicingQldMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getQldNo()) || StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
|
|
@ -302,7 +312,7 @@ public class InvoicingQldApi {
|
|||
}
|
||||
boolean result = qinglingApi.confirmReceipt(dto);
|
||||
if (result) {
|
||||
return Result.OK("收货成功");
|
||||
return Result.OK(qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
} else {
|
||||
return Result.error("收货失败");
|
||||
}
|
||||
|
|
@ -315,6 +325,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-回退", notes = "请领单-回退")
|
||||
@AutoLog(value = "请领单-回退")
|
||||
@PostMapping(value = "/orderReturn")
|
||||
public Result<?> orderReturn(@RequestBody InvoicingQldMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
|
|
@ -322,7 +333,7 @@ public class InvoicingQldApi {
|
|||
}
|
||||
boolean result = qinglingApi.orderReturn(dto);
|
||||
if (result) {
|
||||
return Result.OK("回退成功");
|
||||
return Result.OK(qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
} else {
|
||||
return Result.error("回退失败");
|
||||
}
|
||||
|
|
@ -335,12 +346,17 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-出库(单个/批量)", notes = "请领单-出库(单个/批量)")
|
||||
@AutoLog(value = "请领单-出库(单个/批量)")
|
||||
@PostMapping(value = "/outbound")
|
||||
public Result<Map<String, Object>> outbound(@RequestBody InvoicingQldMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
return Result.ok(qinglingApi.outbound(dto));
|
||||
Map<String, Object> result = qinglingApi.outbound(dto);
|
||||
if("success".equals(result.get("status"))){
|
||||
result.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
}
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -351,6 +367,7 @@ public class InvoicingQldApi {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-调整物料数量", notes = "请领单-调整物料数量")
|
||||
@AutoLog(value = "请领单-调整物料数量")
|
||||
@PostMapping(value = "/updateQldWlSl")
|
||||
public Result<?> updateQldWlSl(@RequestBody InvoicingQldQueryEntity queryDto) {
|
||||
boolean result = qinglingApi.updateQldWlSl(queryDto);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
package com.nu.modules.pad.invoicing.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.InvoicingThdGwcEntity;
|
||||
import com.nu.entity.InvoicingThdMainEntity;
|
||||
import com.nu.entity.NuKcslEntity;
|
||||
import com.nu.modules.invoicing.api.ITuiHuoApi;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 退货单
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pad/invoicing/thd")
|
||||
public class InvoicingThdApi {
|
||||
|
||||
@Autowired
|
||||
private ITuiHuoApi tuiHuoApi;
|
||||
|
||||
/**
|
||||
* 查询退货单
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询退货单-分页列表查询", notes = "查询退货单-分页列表查询")
|
||||
@GetMapping(value = "/thdList")
|
||||
public Result<IPage<InvoicingThdMainEntity>> thdList(InvoicingThdMainEntity dto,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
IPage<InvoicingThdMainEntity> pageList = tuiHuoApi.thdList(pageNo, pageSize, dto);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询退货单-可退货物料
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询退货单-可退货物料", notes = "查询退货单-可退货物料")
|
||||
@GetMapping(value = "/thdNuMaterialList")
|
||||
public Result<List<NuKcslEntity>> thdNuMaterialList(InvoicingThdMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getNuId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
List<NuKcslEntity> pageList = tuiHuoApi.thdNuMaterialList(dto);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退货单-添加退货车
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "退货单-添加退货车", notes = "退货单-添加退货车")
|
||||
@AutoLog(value = "退货单-添加退货车")
|
||||
@PostMapping(value = "/addThc")
|
||||
public Result<?> addThc(@RequestBody InvoicingThdGwcEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getPkId()) || StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())
|
||||
|| StringUtils.isBlank(dto.getKfId()) || StringUtils.isBlank(dto.getWlId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
if (dto.getThNum() == null || dto.getThNum() == 0) {
|
||||
return Result.error("未填写退货数量");
|
||||
}
|
||||
return Result.ok(tuiHuoApi.addThc(dto));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-退货车
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class InvoicingThdGwcEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**createBy*/
|
||||
private String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**主表id nu_invoicing_thd_main.id*/
|
||||
private String pkId;
|
||||
/**库房id nu_warehouse_material_info.nu_id*/
|
||||
private String kfId;
|
||||
/**物料id nu_config_material_info.id*/
|
||||
private String wlId;
|
||||
/**退货数量*/
|
||||
private Integer thNum;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
private String nuId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
private String elderId;
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class InvoicingThdInfoEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**createBy*/
|
||||
private String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**退货单号*/
|
||||
private String thdNo;
|
||||
/**库房id nu_warehouse_material_info.nu_id*/
|
||||
private String kfId;
|
||||
/**物料id nu_config_material_info.id*/
|
||||
private String wlId;
|
||||
/**退货数量*/
|
||||
private Integer thNum;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
private String nuId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
private String elderId;
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class InvoicingThdMainEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**用的是nu_biz_nu_logistics_directive_order.id*/
|
||||
private String id;
|
||||
/**服务发起人*/
|
||||
private String createBy;
|
||||
/**服务发起时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**退货单号*/
|
||||
private String thdNo;
|
||||
/**退货状态 0待执行 1已开始 2已结束*/
|
||||
private String status;
|
||||
/**发起人*/
|
||||
private String fqBy;
|
||||
/**发起时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date fqTime;
|
||||
/**开始人*/
|
||||
private String ksBy;
|
||||
/**开始时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date ksTime;
|
||||
/**结束人*/
|
||||
private String jsBy;
|
||||
/**结束时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date jsTime;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
private String nuId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
private String elderId;
|
||||
/**是否已读 Y已读 N未读*/
|
||||
private String izRead;
|
||||
|
||||
/**
|
||||
* 护理单元名称
|
||||
*/
|
||||
private String nuName;
|
||||
|
||||
/**
|
||||
* 搜索内容
|
||||
*/
|
||||
private String searchContent;
|
||||
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
private String fqrName;
|
||||
/**
|
||||
* 开始人姓名
|
||||
*/
|
||||
private String ksrName;
|
||||
/**
|
||||
* 结束人姓名
|
||||
*/
|
||||
private String jsrName;
|
||||
/**
|
||||
* 退货指令执行状态
|
||||
*/
|
||||
private String statusText;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-护理单元库存数量
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-11-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuKcslEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**库房id nu_warehouse_material_info.nu_id*/
|
||||
private java.lang.String kfId;
|
||||
/**
|
||||
* nuid nu_base_info.nu_id
|
||||
*/
|
||||
private String nuId;
|
||||
/**
|
||||
* 长者id nu_biz_elder_info.id
|
||||
*/
|
||||
private String elderId;
|
||||
/**
|
||||
* 物料id nu_config_material_info.id
|
||||
*/
|
||||
private String wlId;
|
||||
/**
|
||||
* 物料数量
|
||||
*/
|
||||
private Integer wlNum;
|
||||
/**
|
||||
* 物料信息
|
||||
*/
|
||||
private MaterialInfoEntity materialInfo;
|
||||
}
|
||||
|
|
@ -48,4 +48,6 @@ public interface IQinglingApi {
|
|||
boolean deleteQldWl(InvoicingQldQueryEntity queryDto);
|
||||
|
||||
boolean updateQldWlSl(InvoicingQldQueryEntity queryDto);
|
||||
|
||||
InvoicingQldMainEntity queryQldByQldNo(String qldNo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.nu.modules.invoicing.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.InvoicingThdGwcEntity;
|
||||
import com.nu.entity.InvoicingThdMainEntity;
|
||||
import com.nu.entity.NuKcslEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 退货单
|
||||
*/
|
||||
public interface ITuiHuoApi {
|
||||
IPage<InvoicingThdMainEntity> thdList(Integer pageNo, Integer pageSize, InvoicingThdMainEntity dto);
|
||||
|
||||
List<NuKcslEntity> thdNuMaterialList(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String,Object> addThc(InvoicingThdGwcEntity dto);
|
||||
}
|
||||
|
|
@ -38,6 +38,10 @@ public class NuInvoicingNuKcsl implements Serializable {
|
|||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**库房id nu_warehouse_material_info.nu_id*/
|
||||
@Excel(name = "库房id nu_warehouse_material_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "库房id nu_warehouse_material_info.nu_id")
|
||||
private java.lang.String kfId;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
@Excel(name = "nuid nu_base_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "nuid nu_base_info.nu_id")
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.nu.modules.nu.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.nu.entity.InvoicingThdMainEntity;
|
||||
import com.nu.entity.NuKcslEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.nu.entity.NuInvoicingNuKcsl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -14,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface NuInvoicingNuKcslMapper extends BaseMapper<NuInvoicingNuKcsl> {
|
||||
|
||||
List<NuKcslEntity> thdNuMaterialList(InvoicingThdMainEntity dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,4 +2,50 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.nu.mapper.NuInvoicingNuKcslMapper">
|
||||
|
||||
</mapper>
|
||||
<select id="thdNuMaterialList" resultType="com.nu.entity.NuKcslEntity">
|
||||
select
|
||||
nukcsl.kf_id AS kfId,
|
||||
nukcsl.wl_num AS wlNum,
|
||||
material.id AS "materialInfo.id",
|
||||
material.category_id AS "materialInfo.categoryId",
|
||||
material.type_id AS "materialInfo.typeId",
|
||||
material.medication_id AS "materialInfo.medicationId",
|
||||
material.material_name AS "materialInfo.materialName",
|
||||
material.material_no AS "materialInfo.materialNo",
|
||||
material.specification_model AS "materialInfo.specificationModel",
|
||||
material.sales_unit_price AS "materialInfo.salesUnitPrice",
|
||||
material.reference_unit_price AS "materialInfo.referenceUnitPrice",
|
||||
material.material_units AS "materialInfo.materialUnits",
|
||||
material.multi_unit_switch AS "materialInfo.multiUnitSwitch",
|
||||
material.one_unit AS "materialInfo.oneUnit",
|
||||
material.one_unit_proportion AS "materialInfo.oneUnitProportion",
|
||||
material.one_unit_price AS "materialInfo.oneUnitPrice",
|
||||
material.two_unit AS "materialInfo.twoUnit",
|
||||
material.two_unit_proportion AS "materialInfo.twoUnitProportion",
|
||||
material.two_unit_price AS "materialInfo.twoUnitPrice",
|
||||
material.multi_unit_type AS "materialInfo.multiUnitType",
|
||||
material.suppliers AS "materialInfo.suppliers",
|
||||
material.material_img AS "materialInfo.materialImg",
|
||||
material.material_ident AS "materialInfo.materialIdent",
|
||||
material.iz_enabled AS "materialInfo.izEnabled",
|
||||
material.del_flag AS "materialInfo.delFlag",
|
||||
material.create_by AS "materialInfo.createBy",
|
||||
material.create_time AS "materialInfo.createTime",
|
||||
material.update_by AS "materialInfo.updateBy",
|
||||
material.update_time AS "materialInfo.updateTime",
|
||||
material.sys_org_code AS "materialInfo.sysOrgCode",
|
||||
material.pinyin AS "materialInfo.pinyin",
|
||||
material.upper_limit AS "materialInfo.upperLimit",
|
||||
material.lower_limit AS "materialInfo.lowerLimit",
|
||||
material.tag_type AS "materialInfo.tagType",
|
||||
material.iz_ybbx AS "materialInfo.izYbbx",
|
||||
material.iz_jgyh AS "materialInfo.izJgyh"
|
||||
from nu_invoicing_nu_kcsl nukcsl
|
||||
LEFT JOIN nu_config_material_info material ON nukcsl.wl_id = material.id
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
and nukcsl.nu_id = #{nuId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface NuInvoicingQldGwcMapper extends BaseMapper<NuInvoicingQldGwc> {
|
||||
|
||||
int deletePhysics(@Param("id") String gwcId);
|
||||
int deletePhysics(NuInvoicingQldGwc gwcId);
|
||||
|
||||
int removeAllGwc(InvoicingQldQueryEntity queryDto);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,13 +16,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
/**
|
||||
* @Description: 进销存-请领单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-11-26
|
||||
* @Date: 2025-11-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingQldMainMapper extends BaseMapper<NuInvoicingQldMain> {
|
||||
|
||||
List<InvoicingQldInfoEntity> queryUnFinishWlid(InvoicingQldGwcEntity dto);
|
||||
|
||||
InvoicingQldMainEntity queryQldByQldNo(@Param("qldNo") String dto);
|
||||
|
||||
IPage<NuInvoicingQldMain> page(Page<Object> page, @Param("dto") InvoicingQldQueryEntity dto);
|
||||
|
||||
List<NuInvoicingQldLog> selectLogsByQldNos(@Param("qldNos") List<String> qldNos);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<delete id="deletePhysics">
|
||||
delete
|
||||
from nu_invoicing_qld_gwc
|
||||
where id = #{id}
|
||||
where nu_id = #{nuId} and elder_id = #{elderId} and wl_id = #{wlId}
|
||||
</delete>
|
||||
<delete id="removeAllGwc">
|
||||
delete
|
||||
|
|
|
|||
|
|
@ -12,6 +12,32 @@
|
|||
and main.status in ('1', '3', '4')
|
||||
</select>
|
||||
|
||||
<select id="queryQldByQldNo" resultType="com.nu.entity.InvoicingQldMainEntity">
|
||||
SELECT
|
||||
main.*,
|
||||
baseInfo.nu_name AS nuName,
|
||||
tjEmp.realname AS tjByName,
|
||||
zfEmp.realname AS zfByName,
|
||||
htEmp.realname AS htByName,
|
||||
ckEmp.realname AS ckByName,
|
||||
shEmp.realname AS shByName,
|
||||
mainStatus.item_text AS statusText
|
||||
FROM nu_invoicing_qld_main main
|
||||
LEFT JOIN nu_base_info baseInfo ON main.nu_id = baseInfo.nu_id
|
||||
LEFT JOIN sys_user tjEmp ON main.tj_by = tjEmp.id
|
||||
LEFT JOIN sys_user zfEmp ON main.zf_by = zfEmp.id
|
||||
LEFT JOIN sys_user htEmp ON main.ht_by = htEmp.id
|
||||
LEFT JOIN sys_user ckEmp ON main.ck_by = ckEmp.id
|
||||
LEFT JOIN sys_user shEmp ON main.sh_by = shEmp.id
|
||||
LEFT JOIN sys_dict dict ON dict.dict_code = 'qld_status'
|
||||
LEFT JOIN sys_dict_item mainStatus ON mainStatus.dict_id = dict.id AND mainStatus.item_value = main.status
|
||||
<where>
|
||||
<if test="qldNo != null and qldNo != ''">
|
||||
AND main.qld_no = #{qldNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="page" resultType="com.nu.modules.qld.entity.NuInvoicingQldMain">
|
||||
SELECT
|
||||
main.*,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.nu.modules.qld.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.entity.InvoicingQldQueryEntity;
|
||||
import com.nu.modules.qld.entity.NuInvoicingQldGwc;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-请领单-购物车
|
||||
|
|
@ -12,7 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface INuInvoicingQldGwcService extends IService<NuInvoicingQldGwc> {
|
||||
|
||||
int deletePhysics(String gwcId);
|
||||
|
||||
int removeAllGwc(InvoicingQldQueryEntity queryDto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class NuInvoicingQldGwcServiceImpl extends ServiceImpl<NuInvoicingQldGwcMapper, NuInvoicingQldGwc> implements INuInvoicingQldGwcService {
|
||||
|
||||
@Override
|
||||
public int deletePhysics(String gwcId) {
|
||||
return baseMapper.deletePhysics(gwcId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int removeAllGwc(InvoicingQldQueryEntity queryDto) {
|
||||
return baseMapper.removeAllGwc(queryDto);
|
||||
|
|
|
|||
|
|
@ -179,10 +179,14 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
@Override
|
||||
public boolean deleteGwcWl(InvoicingQldQueryEntity queryDto) {
|
||||
if (StringUtils.isBlank(queryDto.getGwcId())) {
|
||||
if (StringUtils.isBlank(queryDto.getNuId()) || StringUtils.isBlank(queryDto.getElderId()) || StringUtils.isBlank(queryDto.getWlId())) {
|
||||
return false;
|
||||
}
|
||||
return invoicingQldGwcService.deletePhysics(queryDto.getGwcId()) > 0 ? true : false;
|
||||
NuInvoicingQldGwc dto = new NuInvoicingQldGwc();
|
||||
dto.setNuId(queryDto.getNuId());
|
||||
dto.setElderId(queryDto.getElderId());
|
||||
dto.setWlId(queryDto.getWlId());
|
||||
return invoicingQldGwcMapper.deletePhysics(dto) > 0 ? true : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -469,50 +473,6 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
logEntities.add(logEntity);
|
||||
}
|
||||
}
|
||||
|
||||
// if (logs.size() == 1) {
|
||||
// // 只有一条数据,直接添加
|
||||
// InvoicingQldLogEntity logEntity = new InvoicingQldLogEntity();
|
||||
// BeanUtils.copyProperties(logs.get(0), logEntity);
|
||||
// logEntities.add(logEntity);
|
||||
// } else {
|
||||
// // 多条数据,根据规则处理
|
||||
// NuInvoicingQldLog firstLog = logs.get(0); // 第一条(最新的)
|
||||
// NuInvoicingQldLog lastLog = logs.get(logs.size() - 1); // 最后一条(最老的)
|
||||
//
|
||||
// // 检查第一条记录的status是否为5
|
||||
// if ("5".equals(firstLog.getStatus())) {
|
||||
// // status为5,保留第一、第二、最后一条
|
||||
// InvoicingQldLogEntity firstEntity = new InvoicingQldLogEntity();
|
||||
// BeanUtils.copyProperties(firstLog, firstEntity);
|
||||
// logEntities.add(firstEntity);
|
||||
//
|
||||
// if (logs.size() > 1) {
|
||||
// InvoicingQldLogEntity secondEntity = new InvoicingQldLogEntity();
|
||||
// BeanUtils.copyProperties(logs.get(1), secondEntity);
|
||||
// logEntities.add(secondEntity);
|
||||
// }
|
||||
//
|
||||
// InvoicingQldLogEntity lastEntity = new InvoicingQldLogEntity();
|
||||
// BeanUtils.copyProperties(lastLog, lastEntity);
|
||||
// logEntities.add(lastEntity);
|
||||
// } else {
|
||||
// // status不为5,只保留第一条和最后一条
|
||||
// InvoicingQldLogEntity firstEntity = new InvoicingQldLogEntity();
|
||||
// BeanUtils.copyProperties(firstLog, firstEntity);
|
||||
// logEntities.add(firstEntity);
|
||||
//
|
||||
// InvoicingQldLogEntity lastEntity = new InvoicingQldLogEntity();
|
||||
// BeanUtils.copyProperties(lastLog, lastEntity);
|
||||
// logEntities.add(lastEntity);
|
||||
// }
|
||||
//
|
||||
// // 去重处理(避免第一条和最后一条是同一记录)
|
||||
// logEntities = logEntities.stream()
|
||||
// .distinct()
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
|
||||
entity.setLogList(logEntities);
|
||||
} else {
|
||||
entity.setLogList(new ArrayList<>());
|
||||
|
|
@ -837,4 +797,41 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
}
|
||||
return invoicingQldInfoMapper.updateQldWlSl(queryDto) > 0 ? true : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvoicingQldMainEntity queryQldByQldNo(String qldNo) {
|
||||
InvoicingQldMainEntity result = invoicingQldMainMapper.queryQldByQldNo(qldNo);
|
||||
// 批量查询操作日志
|
||||
List<String> queryList = Lists.newArrayList();
|
||||
queryList.add(qldNo);
|
||||
List<NuInvoicingQldLog> logs = invoicingQldMainMapper.selectLogsByQldNos(queryList);
|
||||
|
||||
// 处理日志列表
|
||||
if (logs != null && !logs.isEmpty()) {
|
||||
List<InvoicingQldLogEntity> logEntities = new ArrayList<>();
|
||||
|
||||
// 处理日志过滤规则
|
||||
if (logs.size() <= 3) {
|
||||
// 小于等于3条,全部保留
|
||||
for (NuInvoicingQldLog log : logs) {
|
||||
InvoicingQldLogEntity logEntity = new InvoicingQldLogEntity();
|
||||
BeanUtils.copyProperties(log, logEntity);
|
||||
logEntities.add(logEntity);
|
||||
}
|
||||
} else {
|
||||
// 大于3条,只保留前三条
|
||||
int startIndex = logs.size() - 3; // 从倒数第三条开始
|
||||
for (int i = startIndex; i < logs.size(); i++) {
|
||||
InvoicingQldLogEntity logEntity = new InvoicingQldLogEntity();
|
||||
BeanUtils.copyProperties(logs.get(i), logEntity);
|
||||
logEntities.add(logEntity);
|
||||
}
|
||||
}
|
||||
result.setLogList(logEntities);
|
||||
} else {
|
||||
result.setLogList(new ArrayList<>());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.thd.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdGwc;
|
||||
import com.nu.modules.thd.service.INuInvoicingThdGwcService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-退货车
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="进销存-退货单-退货车")
|
||||
@RestController
|
||||
@RequestMapping("/thd/nuInvoicingThdGwc")
|
||||
@Slf4j
|
||||
public class NuInvoicingThdGwcController extends JeecgController<NuInvoicingThdGwc, INuInvoicingThdGwcService> {
|
||||
@Autowired
|
||||
private INuInvoicingThdGwcService nuInvoicingThdGwcService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuInvoicingThdGwc
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "进销存-退货单-退货车-分页列表查询")
|
||||
@ApiOperation(value="进销存-退货单-退货车-分页列表查询", notes="进销存-退货单-退货车-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuInvoicingThdGwc>> queryPageList(NuInvoicingThdGwc nuInvoicingThdGwc,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingThdGwc> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingThdGwc, req.getParameterMap());
|
||||
Page<NuInvoicingThdGwc> page = new Page<NuInvoicingThdGwc>(pageNo, pageSize);
|
||||
IPage<NuInvoicingThdGwc> pageList = nuInvoicingThdGwcService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuInvoicingThdGwc
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-退货车-添加")
|
||||
@ApiOperation(value="进销存-退货单-退货车-添加", notes="进销存-退货单-退货车-添加")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_gwc:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuInvoicingThdGwc nuInvoicingThdGwc) {
|
||||
nuInvoicingThdGwcService.save(nuInvoicingThdGwc);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuInvoicingThdGwc
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-退货车-编辑")
|
||||
@ApiOperation(value="进销存-退货单-退货车-编辑", notes="进销存-退货单-退货车-编辑")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_gwc:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuInvoicingThdGwc nuInvoicingThdGwc) {
|
||||
nuInvoicingThdGwcService.updateById(nuInvoicingThdGwc);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-退货车-通过id删除")
|
||||
@ApiOperation(value="进销存-退货单-退货车-通过id删除", notes="进销存-退货单-退货车-通过id删除")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_gwc:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuInvoicingThdGwcService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-退货车-批量删除")
|
||||
@ApiOperation(value="进销存-退货单-退货车-批量删除", notes="进销存-退货单-退货车-批量删除")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_gwc:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuInvoicingThdGwcService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "进销存-退货单-退货车-通过id查询")
|
||||
@ApiOperation(value="进销存-退货单-退货车-通过id查询", notes="进销存-退货单-退货车-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuInvoicingThdGwc> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuInvoicingThdGwc nuInvoicingThdGwc = nuInvoicingThdGwcService.getById(id);
|
||||
if(nuInvoicingThdGwc==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuInvoicingThdGwc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuInvoicingThdGwc
|
||||
*/
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_gwc:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuInvoicingThdGwc nuInvoicingThdGwc) {
|
||||
return super.exportXls(request, nuInvoicingThdGwc, NuInvoicingThdGwc.class, "进销存-退货单-退货车");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_gwc:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuInvoicingThdGwc.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.thd.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdInfo;
|
||||
import com.nu.modules.thd.service.INuInvoicingThdInfoService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="进销存-退货单-子表")
|
||||
@RestController
|
||||
@RequestMapping("/thd/nuInvoicingThdInfo")
|
||||
@Slf4j
|
||||
public class NuInvoicingThdInfoController extends JeecgController<NuInvoicingThdInfo, INuInvoicingThdInfoService> {
|
||||
@Autowired
|
||||
private INuInvoicingThdInfoService nuInvoicingThdInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuInvoicingThdInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "进销存-退货单-子表-分页列表查询")
|
||||
@ApiOperation(value="进销存-退货单-子表-分页列表查询", notes="进销存-退货单-子表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuInvoicingThdInfo>> queryPageList(NuInvoicingThdInfo nuInvoicingThdInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingThdInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingThdInfo, req.getParameterMap());
|
||||
Page<NuInvoicingThdInfo> page = new Page<NuInvoicingThdInfo>(pageNo, pageSize);
|
||||
IPage<NuInvoicingThdInfo> pageList = nuInvoicingThdInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuInvoicingThdInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-子表-添加")
|
||||
@ApiOperation(value="进销存-退货单-子表-添加", notes="进销存-退货单-子表-添加")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuInvoicingThdInfo nuInvoicingThdInfo) {
|
||||
nuInvoicingThdInfoService.save(nuInvoicingThdInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuInvoicingThdInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-子表-编辑")
|
||||
@ApiOperation(value="进销存-退货单-子表-编辑", notes="进销存-退货单-子表-编辑")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_info:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuInvoicingThdInfo nuInvoicingThdInfo) {
|
||||
nuInvoicingThdInfoService.updateById(nuInvoicingThdInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-子表-通过id删除")
|
||||
@ApiOperation(value="进销存-退货单-子表-通过id删除", notes="进销存-退货单-子表-通过id删除")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_info:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuInvoicingThdInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-子表-批量删除")
|
||||
@ApiOperation(value="进销存-退货单-子表-批量删除", notes="进销存-退货单-子表-批量删除")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_info:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuInvoicingThdInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "进销存-退货单-子表-通过id查询")
|
||||
@ApiOperation(value="进销存-退货单-子表-通过id查询", notes="进销存-退货单-子表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuInvoicingThdInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuInvoicingThdInfo nuInvoicingThdInfo = nuInvoicingThdInfoService.getById(id);
|
||||
if(nuInvoicingThdInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuInvoicingThdInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuInvoicingThdInfo
|
||||
*/
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_info:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuInvoicingThdInfo nuInvoicingThdInfo) {
|
||||
return super.exportXls(request, nuInvoicingThdInfo, NuInvoicingThdInfo.class, "进销存-退货单-子表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_info:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuInvoicingThdInfo.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.thd.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdMain;
|
||||
import com.nu.modules.thd.service.INuInvoicingThdMainService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="进销存-退货单-主表")
|
||||
@RestController
|
||||
@RequestMapping("/thd/nuInvoicingThdMain")
|
||||
@Slf4j
|
||||
public class NuInvoicingThdMainController extends JeecgController<NuInvoicingThdMain, INuInvoicingThdMainService> {
|
||||
@Autowired
|
||||
private INuInvoicingThdMainService nuInvoicingThdMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuInvoicingThdMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "进销存-退货单-主表-分页列表查询")
|
||||
@ApiOperation(value="进销存-退货单-主表-分页列表查询", notes="进销存-退货单-主表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuInvoicingThdMain>> queryPageList(NuInvoicingThdMain nuInvoicingThdMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingThdMain> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingThdMain, req.getParameterMap());
|
||||
Page<NuInvoicingThdMain> page = new Page<NuInvoicingThdMain>(pageNo, pageSize);
|
||||
IPage<NuInvoicingThdMain> pageList = nuInvoicingThdMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuInvoicingThdMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-主表-添加")
|
||||
@ApiOperation(value="进销存-退货单-主表-添加", notes="进销存-退货单-主表-添加")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_main:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuInvoicingThdMain nuInvoicingThdMain) {
|
||||
nuInvoicingThdMainService.save(nuInvoicingThdMain);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuInvoicingThdMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-主表-编辑")
|
||||
@ApiOperation(value="进销存-退货单-主表-编辑", notes="进销存-退货单-主表-编辑")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_main:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuInvoicingThdMain nuInvoicingThdMain) {
|
||||
nuInvoicingThdMainService.updateById(nuInvoicingThdMain);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-主表-通过id删除")
|
||||
@ApiOperation(value="进销存-退货单-主表-通过id删除", notes="进销存-退货单-主表-通过id删除")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_main:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuInvoicingThdMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "进销存-退货单-主表-批量删除")
|
||||
@ApiOperation(value="进销存-退货单-主表-批量删除", notes="进销存-退货单-主表-批量删除")
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_main:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuInvoicingThdMainService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "进销存-退货单-主表-通过id查询")
|
||||
@ApiOperation(value="进销存-退货单-主表-通过id查询", notes="进销存-退货单-主表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuInvoicingThdMain> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuInvoicingThdMain nuInvoicingThdMain = nuInvoicingThdMainService.getById(id);
|
||||
if(nuInvoicingThdMain==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuInvoicingThdMain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuInvoicingThdMain
|
||||
*/
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_main:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuInvoicingThdMain nuInvoicingThdMain) {
|
||||
return super.exportXls(request, nuInvoicingThdMain, NuInvoicingThdMain.class, "进销存-退货单-主表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("thd:nu_invoicing_thd_main:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuInvoicingThdMain.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.nu.modules.thd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-退货车
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_thd_gwc")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_thd_gwc对象", description="进销存-退货单-退货车")
|
||||
public class NuInvoicingThdGwc implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**主表id nu_invoicing_thd_main.id*/
|
||||
@Excel(name = "主表id nu_invoicing_thd_main.id", width = 15)
|
||||
@ApiModelProperty(value = "主表id nu_invoicing_thd_main.id")
|
||||
private java.lang.String pkId;
|
||||
/**库房id nu_warehouse_material_info.nu_id*/
|
||||
@Excel(name = "库房id nu_warehouse_material_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "库房id nu_warehouse_material_info.nu_id")
|
||||
private java.lang.String kfId;
|
||||
/**物料id nu_config_material_info.id*/
|
||||
@Excel(name = "物料id nu_config_material_info.id", width = 15)
|
||||
@ApiModelProperty(value = "物料id nu_config_material_info.id")
|
||||
private java.lang.String wlId;
|
||||
/**退货数量*/
|
||||
@Excel(name = "退货数量", width = 15)
|
||||
@ApiModelProperty(value = "退货数量")
|
||||
private java.lang.Integer thNum;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
@Excel(name = "nuid nu_base_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "nuid nu_base_info.nu_id")
|
||||
private java.lang.String nuId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者id nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者id nu_biz_elder_info.id")
|
||||
private java.lang.String elderId;
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.nu.modules.thd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_thd_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_thd_info对象", description="进销存-退货单-子表")
|
||||
public class NuInvoicingThdInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**退货单号*/
|
||||
@Excel(name = "退货单号", width = 15)
|
||||
@ApiModelProperty(value = "退货单号")
|
||||
private java.lang.String thdNo;
|
||||
/**库房id nu_warehouse_material_info.nu_id*/
|
||||
@Excel(name = "库房id nu_warehouse_material_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "库房id nu_warehouse_material_info.nu_id")
|
||||
private java.lang.String kfId;
|
||||
/**物料id nu_config_material_info.id*/
|
||||
@Excel(name = "物料id nu_config_material_info.id", width = 15)
|
||||
@ApiModelProperty(value = "物料id nu_config_material_info.id")
|
||||
private java.lang.String wlId;
|
||||
/**退货数量*/
|
||||
@Excel(name = "退货数量", width = 15)
|
||||
@ApiModelProperty(value = "退货数量")
|
||||
private java.lang.Integer thNum;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
@Excel(name = "nuid nu_base_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "nuid nu_base_info.nu_id")
|
||||
private java.lang.String nuId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者id nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者id nu_biz_elder_info.id")
|
||||
private java.lang.String elderId;
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package com.nu.modules.thd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_thd_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_thd_main对象", description="进销存-退货单-主表")
|
||||
public class NuInvoicingThdMain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**用的是nu_biz_nu_logistics_directive_order.id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "用的是nu_biz_nu_logistics_directive_order.id")
|
||||
private java.lang.String id;
|
||||
/**服务发起人*/
|
||||
@ApiModelProperty(value = "服务发起人")
|
||||
private java.lang.String createBy;
|
||||
/**服务发起时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "服务发起时间")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**退货单号*/
|
||||
@Excel(name = "退货单号", width = 15)
|
||||
@ApiModelProperty(value = "退货单号")
|
||||
private java.lang.String thdNo;
|
||||
/**退货状态 0待执行 1已开始 2已结束*/
|
||||
@Excel(name = "退货状态 0待执行 1已开始 2已结束", width = 15)
|
||||
@ApiModelProperty(value = "退货状态 0待执行 1已开始 2已结束")
|
||||
private java.lang.String status;
|
||||
/**发起人*/
|
||||
@Excel(name = "发起人", width = 15)
|
||||
@ApiModelProperty(value = "发起人")
|
||||
private java.lang.String fqBy;
|
||||
/**发起时间*/
|
||||
@Excel(name = "发起时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "发起时间")
|
||||
private java.util.Date fqTime;
|
||||
/**开始人*/
|
||||
@Excel(name = "开始人", width = 15)
|
||||
@ApiModelProperty(value = "开始人")
|
||||
private java.lang.String ksBy;
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.util.Date ksTime;
|
||||
/**结束人*/
|
||||
@Excel(name = "结束人", width = 15)
|
||||
@ApiModelProperty(value = "结束人")
|
||||
private java.lang.String jsBy;
|
||||
/**结束时间*/
|
||||
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.util.Date jsTime;
|
||||
/**nuid nu_base_info.nu_id*/
|
||||
@Excel(name = "nuid nu_base_info.nu_id", width = 15)
|
||||
@ApiModelProperty(value = "nuid nu_base_info.nu_id")
|
||||
private java.lang.String nuId;
|
||||
/**长者id nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者id nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者id nu_biz_elder_info.id")
|
||||
private java.lang.String elderId;
|
||||
/**是否已读 Y已读 N未读*/
|
||||
@Excel(name = "是否已读 Y已读 N未读", width = 15)
|
||||
@ApiModelProperty(value = "是否已读 Y已读 N未读")
|
||||
private java.lang.String izRead;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.thd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdGwc;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-退货车
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingThdGwcMapper extends BaseMapper<NuInvoicingThdGwc> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.thd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingThdInfoMapper extends BaseMapper<NuInvoicingThdInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.nu.modules.thd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.InvoicingThdMainEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingThdMainMapper extends BaseMapper<NuInvoicingThdMain> {
|
||||
|
||||
IPage<InvoicingThdMainEntity> thdList(Page<NuInvoicingThdMain> page,@Param("dto") InvoicingThdMainEntity dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.thd.mapper.NuInvoicingThdGwcMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.thd.mapper.NuInvoicingThdInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.thd.mapper.NuInvoicingThdMainMapper">
|
||||
|
||||
<select id="thdList" resultType="com.nu.entity.InvoicingThdMainEntity">
|
||||
select
|
||||
main.*,
|
||||
baseInfo.nu_name AS nuName,
|
||||
sqrtemp.realname AS fqrName,
|
||||
ksrtemp.realname AS ksrName,
|
||||
jsrtemp.realname AS jsrName,
|
||||
logStatus.item_text AS statusText
|
||||
from nu_invoicing_thd_main main
|
||||
left join nu_base_info baseInfo on main.nu_id = baseInfo.nu_id
|
||||
left join sys_user sqrtemp on sqrtemp.id = main.fq_by
|
||||
left join sys_user ksrtemp on ksrtemp.id = main.ks_by
|
||||
left join sys_user jsrtemp on jsrtemp.id = main.js_by
|
||||
LEFT JOIN sys_dict dict ON dict.dict_code = 'thd_status'
|
||||
LEFT JOIN sys_dict_item logStatus ON logStatus.dict_id = dict.id AND logStatus.item_value = main.status
|
||||
<where>
|
||||
<if test="dto.searchContent != null and dto.searchContent != ''">
|
||||
AND (
|
||||
sqrtemp.realname LIKE CONCAT('%', #{dto.searchContent}, '%')
|
||||
or baseInfo.nu_name LIKE CONCAT('%', #{dto.searchContent}, '%')
|
||||
or main.nu_id LIKE CONCAT('%', #{dto.searchContent}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="dto.status != null and dto.status != ''">
|
||||
AND main.status IN
|
||||
<foreach collection="dto.status.split(',')" item="status" open="(" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
GREATEST(
|
||||
COALESCE(main.update_time, '1970-01-01 00:00:00'),
|
||||
COALESCE(main.create_time, '1970-01-01 00:00:00')
|
||||
) DESC,
|
||||
main.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.thd.service;
|
||||
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdGwc;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-退货车
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuInvoicingThdGwcService extends IService<NuInvoicingThdGwc> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.thd.service;
|
||||
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuInvoicingThdInfoService extends IService<NuInvoicingThdInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.thd.service;
|
||||
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuInvoicingThdMainService extends IService<NuInvoicingThdMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.thd.service.impl;
|
||||
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdGwc;
|
||||
import com.nu.modules.thd.mapper.NuInvoicingThdGwcMapper;
|
||||
import com.nu.modules.thd.service.INuInvoicingThdGwcService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-退货车
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuInvoicingThdGwcServiceImpl extends ServiceImpl<NuInvoicingThdGwcMapper, NuInvoicingThdGwc> implements INuInvoicingThdGwcService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.thd.service.impl;
|
||||
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdInfo;
|
||||
import com.nu.modules.thd.mapper.NuInvoicingThdInfoMapper;
|
||||
import com.nu.modules.thd.service.INuInvoicingThdInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuInvoicingThdInfoServiceImpl extends ServiceImpl<NuInvoicingThdInfoMapper, NuInvoicingThdInfo> implements INuInvoicingThdInfoService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.thd.service.impl;
|
||||
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdMain;
|
||||
import com.nu.modules.thd.mapper.NuInvoicingThdMainMapper;
|
||||
import com.nu.modules.thd.service.INuInvoicingThdMainService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuInvoicingThdMainServiceImpl extends ServiceImpl<NuInvoicingThdMainMapper, NuInvoicingThdMain> implements INuInvoicingThdMainService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.nu.modules.thd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.entity.InvoicingThdGwcEntity;
|
||||
import com.nu.entity.InvoicingThdMainEntity;
|
||||
import com.nu.entity.NuKcslEntity;
|
||||
import com.nu.modules.invoicing.api.ITuiHuoApi;
|
||||
import com.nu.modules.nu.entity.NuInvoicingNuKcsl;
|
||||
import com.nu.modules.nu.mapper.NuInvoicingNuKcslMapper;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdGwc;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdMain;
|
||||
import com.nu.modules.thd.mapper.NuInvoicingThdGwcMapper;
|
||||
import com.nu.modules.thd.mapper.NuInvoicingThdMainMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 进销存-退货单-通用处理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ThdServiceImpl implements ITuiHuoApi {
|
||||
|
||||
@Autowired
|
||||
private NuInvoicingThdMainMapper thdMainMapper;
|
||||
@Autowired
|
||||
private NuInvoicingNuKcslMapper nuKcslMapper;
|
||||
@Autowired
|
||||
private NuInvoicingThdGwcMapper thdGwcMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingThdMainEntity> thdList(Integer pageNo, Integer pageSize, InvoicingThdMainEntity dto) {
|
||||
Page<NuInvoicingThdMain> page = new Page<>(pageNo, pageSize);
|
||||
return thdMainMapper.thdList(page, dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NuKcslEntity> thdNuMaterialList(InvoicingThdMainEntity dto) {
|
||||
return nuKcslMapper.thdNuMaterialList(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> addThc(InvoicingThdGwcEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
//检测退货数量是否小于等于护理单元库存数量
|
||||
QueryWrapper<NuInvoicingNuKcsl> kcslQW = new QueryWrapper<>();
|
||||
kcslQW.eq("nu_id", dto.getNuId());
|
||||
kcslQW.eq("wl_id", dto.getWlId());
|
||||
NuInvoicingNuKcsl kcsl = nuKcslMapper.selectOne(kcslQW);
|
||||
if (kcsl == null || kcsl.getWlNum() == null || kcsl.getWlNum() < dto.getThNum()) {
|
||||
//护理单元无此物料/存量小于退货数量
|
||||
result.put("status","numError");
|
||||
return result;
|
||||
}
|
||||
|
||||
//退货车是否已存在此物料
|
||||
QueryWrapper<NuInvoicingThdGwc> thcQW = new QueryWrapper<>();
|
||||
thcQW.eq("pk_id",dto.getPkId());
|
||||
thcQW.eq("wl_id",dto.getWlId());
|
||||
List<NuInvoicingThdGwc> thcList = thdGwcMapper.selectList(thcQW);
|
||||
if(!CollectionUtils.isEmpty(thcList)){
|
||||
//已存在该物料
|
||||
result.put("status","existed");
|
||||
return result;
|
||||
}
|
||||
|
||||
//可以添加到购物车
|
||||
NuInvoicingThdGwc thc = new NuInvoicingThdGwc();
|
||||
thc.setPkId(dto.getPkId());//主表id
|
||||
thc.setNuId(dto.getNuId());
|
||||
thc.setElderId(dto.getElderId());//长者id
|
||||
thc.setKfId(dto.getKfId());//库房id
|
||||
thc.setWlId(dto.getWlId());//物料id
|
||||
thc.setThNum(dto.getThNum());//退货数量
|
||||
thdGwcMapper.insert(thc);//新增
|
||||
|
||||
result.put("status","success");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue