Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
136875d6c0
|
|
@ -73,9 +73,6 @@ public class NuInvoicingCgdMainController extends JeecgController<NuInvoicingCgd
|
|||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingCgdMain> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdMain, req.getParameterMap());
|
||||
Page<NuInvoicingCgdMain> page = new Page<NuInvoicingCgdMain>(pageNo, pageSize);
|
||||
if (nuInvoicingCgdMain.getJhTime_() != null) {
|
||||
|
||||
}
|
||||
//付款单-生成采购单
|
||||
if ("fukuandan".equals(nuInvoicingCgdMain.getResourceFrontView())) {
|
||||
//没选择供应商时不应返回结果
|
||||
|
|
@ -92,6 +89,42 @@ public class NuInvoicingCgdMainController extends JeecgController<NuInvoicingCgd
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询(计算已拣货总价)
|
||||
*
|
||||
* @param nuInvoicingCgdMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "采购单-分页列表查询")
|
||||
@ApiOperation(value = "采购单-分页列表查询(计算已拣货总价)", notes = "采购单-分页列表查询(计算已拣货总价)")
|
||||
@GetMapping(value = "/calcList")
|
||||
public Result<IPage<NuInvoicingCgdMain>> calcList(NuInvoicingCgdMain nuInvoicingCgdMain,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingCgdMain> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdMain, req.getParameterMap());
|
||||
Page<NuInvoicingCgdMain> page = new Page<NuInvoicingCgdMain>(pageNo, pageSize);
|
||||
//付款单-生成采购单
|
||||
if ("fukuandan".equals(nuInvoicingCgdMain.getResourceFrontView())) {
|
||||
//没选择供应商时不应返回结果
|
||||
if (StringUtils.isBlank(nuInvoicingCgdMain.getGysId())) {
|
||||
Page<NuInvoicingCgdMain> emptyPage = new Page<>(pageNo, pageSize);
|
||||
return Result.OK(emptyPage);
|
||||
} else {
|
||||
//生成付款单只查询“已完结”采购单
|
||||
queryWrapper.eq("cgd_type", "2");
|
||||
queryWrapper.eq("iz_fkd", "N");
|
||||
queryWrapper.groupBy("main.id");
|
||||
}
|
||||
}
|
||||
|
||||
IPage<NuInvoicingCgdMain> pageList = nuInvoicingCgdMainService.calcList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,126 +22,178 @@ import lombok.experimental.Accessors;
|
|||
/**
|
||||
* @Description: nu_invoicing_cgd_main
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_cgd_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_cgd_main对象", description="nu_invoicing_cgd_main")
|
||||
@ApiModel(value = "nu_invoicing_cgd_main对象", description = "nu_invoicing_cgd_main")
|
||||
public class NuInvoicingCgdMain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**createBy*/
|
||||
/**
|
||||
* createBy
|
||||
*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
/**
|
||||
* createTime
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
/**
|
||||
* updateBy
|
||||
*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
/**
|
||||
* updateTime
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private Date updateTime;
|
||||
/**采购单单号*/
|
||||
@Excel(name = "采购单单号", width = 15)
|
||||
/**
|
||||
* 采购单单号
|
||||
*/
|
||||
@Excel(name = "采购单单号", width = 15)
|
||||
@ApiModelProperty(value = "采购单单号")
|
||||
private String cgdNo;
|
||||
/**供应商id*/
|
||||
@Excel(name = "供应商id", width = 15)
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
@Excel(name = "供应商id", width = 15)
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
@Dict(dicCode = "id", dictTable = "nu_config_suppliers_info",dicText = "suppliers_name")
|
||||
@Dict(dicCode = "id", dictTable = "nu_config_suppliers_info", dicText = "suppliers_name")
|
||||
private String gysId;
|
||||
/**请购时间*/
|
||||
@Excel(name = "请购时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
/**
|
||||
* 请购时间
|
||||
*/
|
||||
@Excel(name = "请购时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "请购时间")
|
||||
private Date qgDate;
|
||||
/**请购人*/
|
||||
@Excel(name = "请购人", width = 15)
|
||||
/**
|
||||
* 请购人
|
||||
*/
|
||||
@Excel(name = "请购人", width = 15)
|
||||
@ApiModelProperty(value = "请购人")
|
||||
private String qgBy;
|
||||
/**供应商联系人*/
|
||||
@Excel(name = "供应商联系人", width = 15)
|
||||
/**
|
||||
* 供应商联系人
|
||||
*/
|
||||
@Excel(name = "供应商联系人", width = 15)
|
||||
@ApiModelProperty(value = "供应商联系人")
|
||||
private String gysLxr;
|
||||
/**供应商联系电话*/
|
||||
@Excel(name = "供应商联系电话", width = 15)
|
||||
/**
|
||||
* 供应商联系电话
|
||||
*/
|
||||
@Excel(name = "供应商联系电话", width = 15)
|
||||
@ApiModelProperty(value = "供应商联系电话")
|
||||
private String gysLxrdh;
|
||||
/**供应商openId*/
|
||||
@Excel(name = "供应商openId", width = 15)
|
||||
/**
|
||||
* 供应商openId
|
||||
*/
|
||||
@Excel(name = "供应商openId", width = 15)
|
||||
@ApiModelProperty(value = "供应商openId")
|
||||
private String gysOpenId;
|
||||
/**付款方式*/
|
||||
@Excel(name = "付款方式", width = 15)
|
||||
/**
|
||||
* 付款方式
|
||||
*/
|
||||
@Excel(name = "付款方式", width = 15)
|
||||
@ApiModelProperty(value = "付款方式")
|
||||
@Dict(dicCode = "gys_fkfs")
|
||||
private String gysFkfs;
|
||||
/**状态 0:待采购 1:采购中 2采购完成 3作废*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
/**
|
||||
* 状态 0:待采购 1:采购中 2采购完成 3作废
|
||||
*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Dict(dicCode = "cgd_status")
|
||||
private String status;
|
||||
/**采购单类型 0采购单 1挂帐单 2结账单 9作废*/
|
||||
@Excel(name = "采购单类型", width = 15)
|
||||
/**
|
||||
* 采购单类型 0采购单 1挂帐单 2结账单 9作废
|
||||
*/
|
||||
@Excel(name = "采购单类型", width = 15)
|
||||
@ApiModelProperty(value = "采购单类型")
|
||||
@Dict(dicCode = "cgd_type")
|
||||
private String cgdType;
|
||||
/**随行单*/
|
||||
@Excel(name = "随行单", width = 15)
|
||||
/**
|
||||
* 随行单
|
||||
*/
|
||||
@Excel(name = "随行单", width = 15)
|
||||
@ApiModelProperty(value = "随行单")
|
||||
private String sxdPath;
|
||||
/**销账单*/
|
||||
@Excel(name = "销账单", width = 15)
|
||||
/**
|
||||
* 销账单
|
||||
*/
|
||||
@Excel(name = "销账单", width = 15)
|
||||
@ApiModelProperty(value = "销账单")
|
||||
private String xzdPath;
|
||||
/**结账单*/
|
||||
@Excel(name = "结账单", width = 15)
|
||||
/**
|
||||
* 结账单
|
||||
*/
|
||||
@Excel(name = "结账单", width = 15)
|
||||
@ApiModelProperty(value = "结账单")
|
||||
private String jzdPath;
|
||||
/**审核人*/
|
||||
@Excel(name = "审核人", width = 15)
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
@Excel(name = "审核人", width = 15)
|
||||
@ApiModelProperty(value = "审核人")
|
||||
private String reviewedBy;
|
||||
/**审核时间*/
|
||||
@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")
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@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 Date reviewedTime;
|
||||
/**审核备注*/
|
||||
@Excel(name = "审核备注", width = 15)
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
@Excel(name = "审核备注", width = 15)
|
||||
@ApiModelProperty(value = "审核备注")
|
||||
private String content;
|
||||
/**供应商名称*/
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String gysName;
|
||||
|
||||
/**拣货人*/
|
||||
/**
|
||||
* 拣货人
|
||||
*/
|
||||
private String jhBy;
|
||||
|
||||
/**拣货时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="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 Date jhTime;
|
||||
/**完结人*/
|
||||
/**
|
||||
* 完结人
|
||||
*/
|
||||
private String wjBy;
|
||||
|
||||
/**完结时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="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 Date wjTime;
|
||||
|
||||
|
|
@ -149,56 +201,41 @@ public class NuInvoicingCgdMain implements Serializable {
|
|||
// 总价
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**是否是新的单子 Y是 N不是*/
|
||||
/**
|
||||
* 是否是新的单子 Y是 N不是
|
||||
*/
|
||||
private String izNew;
|
||||
private String shareBy;
|
||||
private String shareTel;
|
||||
private String nuId;
|
||||
private String sysOrgCode;
|
||||
|
||||
/**是否已生成有效付款单 Y是 N否*/
|
||||
/**
|
||||
* 是否已生成有效付款单 Y是 N否
|
||||
*/
|
||||
private String izFkd;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String qgdId;//临时变量,用于清空购物车id
|
||||
|
||||
/**采购的物料信息*/
|
||||
/**
|
||||
* 采购的物料信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<NuInvoicingCgdInfo> cgdInfoList;
|
||||
|
||||
/**来源于哪个前端界面*/
|
||||
/**
|
||||
* 来源于哪个前端界面
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String resourceFrontView;
|
||||
|
||||
@TableField(exist = false)
|
||||
private BigDecimal crkje;
|
||||
@TableField(exist = false)
|
||||
private String crksl;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal xiaoJi;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date jhTime_;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date jhTimevBegin;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date jhTime_end;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date jhTime__end;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date jhTime__End;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date jhTimevEnd;
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date wjTime_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,11 @@ package com.nu.modules.cgd.mapper;
|
|||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.CgdMainEntity;
|
||||
import com.nu.modules.qgd.entity.QgdInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -18,4 +21,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
public interface NuInvoicingCgdMainMapper extends BaseMapper<NuInvoicingCgdMain> {
|
||||
|
||||
List<NuInvoicingCgdMain> getCgrList(@Param("params") CgdMainEntity cgdMainEntityDto);
|
||||
|
||||
IPage<NuInvoicingCgdMain> calcList(Page<NuInvoicingCgdMain> page, @Param(Constants.WRAPPER) QueryWrapper<NuInvoicingCgdMain> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,20 @@
|
|||
<mapper namespace="com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper">
|
||||
|
||||
<select id="getCgrList" resultType="com.nu.modules.cgd.entity.NuInvoicingCgdMain">
|
||||
select qg_by from nu_invoicing_cgd_main GROUP BY qg_by
|
||||
select qg_by
|
||||
from nu_invoicing_cgd_main
|
||||
GROUP BY qg_by
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
<select id="calcList" resultType="com.nu.modules.cgd.entity.NuInvoicingCgdMain">
|
||||
SELECT main.*,
|
||||
COALESCE(SUM(CAST(crk.crk_num AS DECIMAL(10, 2)) * crk.new_price), 0) AS xiaoJi
|
||||
FROM nu_invoicing_cgd_main main
|
||||
LEFT JOIN nu_invoicing_cgd_info info ON main.id = info.cgd_id
|
||||
LEFT JOIN nu_warehouse_material_crk_info crk ON crk.cgd_id = info.cgd_id
|
||||
AND crk.wl_id = info.wl_id
|
||||
AND crk.crk_status = 1
|
||||
AND crk.crk_type = 1
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.nu.modules.cgd.service;
|
||||
|
||||
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.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
|
@ -14,4 +17,6 @@ public interface INuInvoicingCgdMainService extends IService<NuInvoicingCgdMain>
|
|||
void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain);
|
||||
|
||||
void auditInfo(NuInvoicingCgdMain nuInvoicingCgdMain);
|
||||
|
||||
IPage<NuInvoicingCgdMain> calcList(Page<NuInvoicingCgdMain> page, QueryWrapper<NuInvoicingCgdMain> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,6 +113,22 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
baseMapper.updateById(nuInvoicingCgdMain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<NuInvoicingCgdMain> calcList(Page<NuInvoicingCgdMain> page, QueryWrapper<NuInvoicingCgdMain> queryWrapper) {
|
||||
//分页数据
|
||||
IPage<NuInvoicingCgdMain> result = baseMapper.calcList(page, queryWrapper);
|
||||
List<NuInvoicingCgdMain> records = result.getRecords();
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
NuInvoicingCgdMain item = records.get(i);
|
||||
if (item.getCrkje() != null && StringUtils.isNotBlank(item.getCrksl())) {
|
||||
// 计算每条记录的 crkje * crksl
|
||||
item.setXiaoJi(item.getCrkje().multiply(new BigDecimal(item.getCrksl())));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------pad 接口-------------------------------------------------
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue