This commit is contained in:
1378012178@qq.com 2025-10-13 15:12:09 +08:00
commit 017cf551c9
41 changed files with 1301 additions and 25 deletions

View File

@ -57,5 +57,11 @@
<version>2.0.0</version> <version>2.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-invoicing-local-api</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -27,7 +27,7 @@ public class NuConfigServiceCategoryController extends JeecgController<NuConfigS
private INuConfigServiceCategoryService nuConfigServiceCategoryService; private INuConfigServiceCategoryService nuConfigServiceCategoryService;
/** /**
* 分页列表查询 * 获取护理类服务器指令树
* *
* @param nuConfigServiceCategory * @param nuConfigServiceCategory
* @return * @return

View File

@ -41,6 +41,9 @@ public class NuConfigServiceCategory implements Serializable {
@Excel(name = "服务类别名称", width = 15) @Excel(name = "服务类别名称", width = 15)
@ApiModelProperty(value = "服务类别名称") @ApiModelProperty(value = "服务类别名称")
private java.lang.String categoryName; private java.lang.String categoryName;
@Excel(name = "分类标签id", width = 15)
@ApiModelProperty(value = "分类标签id")
private java.lang.String instructionId;
/**排序*/ /**排序*/
@Excel(name = "排序", width = 15) @Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
@ -73,4 +76,11 @@ public class NuConfigServiceCategory implements Serializable {
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**网络标记0为用pad本地静态图片1为用网络图*/
@ApiModelProperty(value = "网络标记")
private java.lang.String netFlag;
/**动画图片*/
@ApiModelProperty(value = "动画图片")
private java.lang.String animationPath;
} }

View File

@ -123,7 +123,16 @@ public class NuConfigServiceDirective implements Serializable {
@Excel(name = "视频文件", width = 15) @Excel(name = "视频文件", width = 15)
@ApiModelProperty(value = "视频文件") @ApiModelProperty(value = "视频文件")
private java.lang.String mp4File; private java.lang.String mp4File;
/**
* 即时指令图标
*/
@ApiModelProperty(value = "即时指令图标")
private java.lang.String immediateFile;
/**
* 即时指令焦点图标
*/
@ApiModelProperty(value = "即时指令图标")
private java.lang.String immediateFileFocus;
//体型标签 //体型标签
@TableField(exist = false) @TableField(exist = false)
private String bodyTagName; private String bodyTagName;

View File

@ -77,4 +77,10 @@ public class NuConfigServiceType implements Serializable {
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**网络标记0为用pad本地静态图片1为用网络图*/
@ApiModelProperty(value = "网络标记")
private java.lang.String netFlag;
/**动画图片*/
@ApiModelProperty(value = "动画图片")
private java.lang.String animationPath;
} }

View File

@ -0,0 +1,83 @@
package com.nu.modules.nuApiServiceCategory.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 服务指令-分类标签
* @Author: jeecg-boot
* @Date: 2025-07-10
* @Version: V1.0
*/
@Data
@TableName("nu_config_service_instruction_tag")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class NuInstructionTag implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**分类标签名称*/
@Excel(name = "分类标签名称", width = 15)
@ApiModelProperty(value = "分类标签名称")
private String instructionName;
@Excel(name = "分类标签类型", width = 15)
@ApiModelProperty(value = "分类标签类型")
private String instructionType;
/**排序*/
@Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序")
private Integer sort;
/**状态 0已授权 1未授权*/
@Excel(name = "状态 0已授权 1未授权", width = 15)
@ApiModelProperty(value = "状态 0已授权 1未授权")
@Dict(dicCode = "status")
private String status;
/**是否启用 0启用 1未启用*/
@Excel(name = "是否启用", width = 15)
@ApiModelProperty(value = "是否启用")
@Dict(dicCode = "iz_enabled")
private String izEnabled;
/**是否删除 0未删除 1删除*/
@Excel(name = "是否删除", width = 15)
@ApiModelProperty(value = "是否删除")
@TableLogic
private String delFlag;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
private String icon;
}

View File

@ -0,0 +1,15 @@
package com.nu.modules.nuApiServiceCategory.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceType;
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
/**
* @Description: 分类标签
* @Author: caolei
* @Date: 2025-10-11
* @Version: V1.0
*/
public interface NuInstructionTagMapper extends BaseMapper<NuInstructionTag> {
}

View File

@ -26,6 +26,8 @@
csd.sys_org_code, csd.sys_org_code,
csd.mp3_file, csd.mp3_file,
csd.mp4_file, csd.mp4_file,
csd.immediate_file as immediateFile,
csd.immediate_file_focus as immediateFileFocus,
cdt.tag_name as bodyTagName, cdt.tag_name as bodyTagName,
cet.tag_name AS emotionTagName cet.tag_name AS emotionTagName
FROM nu_config_service_directive csd FROM nu_config_service_directive csd

View File

@ -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.nuApiServiceCategory.mapper.NuInstructionTagMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package com.nu.modules.nuApiServiceCategory.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
/**
* @Description: 分类标签
* @Author: caolei
* @Date: 2025-10-11
* @Version: V1.0
*/
public interface INuInstructionTagService extends IService<NuInstructionTag> {
}

View File

@ -1,14 +1,18 @@
package com.nu.modules.nuApiServiceCategory.service.impl; package com.nu.modules.nuApiServiceCategory.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceCategory; import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceCategory;
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceDirective; import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceDirective;
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceType; import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceType;
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
import com.nu.modules.nuApiServiceCategory.mapper.NuConfigServiceCategoryMapper; import com.nu.modules.nuApiServiceCategory.mapper.NuConfigServiceCategoryMapper;
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceCategoryService; import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceCategoryService;
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceDirectiveService; import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceDirectiveService;
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceTypeService; import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceTypeService;
import com.nu.modules.nuApiServiceCategory.service.INuInstructionTagService;
import com.nu.modules.sysconfig.ISysConfigApi;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -27,12 +31,27 @@ import java.util.Map;
@Service @Service
public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServiceCategoryMapper, NuConfigServiceCategory> implements INuConfigServiceCategoryService { public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServiceCategoryMapper, NuConfigServiceCategory> implements INuConfigServiceCategoryService {
@Autowired
private INuInstructionTagService nuInstructionTagService;
@Autowired @Autowired
private INuConfigServiceTypeService nuConfigServiceTypeService; private INuConfigServiceTypeService nuConfigServiceTypeService;
@Autowired @Autowired
private INuConfigServiceDirectiveService nuConfigServiceDirectiveService; private INuConfigServiceDirectiveService nuConfigServiceDirectiveService;
@Autowired
private ISysConfigApi sysConfigApi;
@Override @Override
public List<Map<String, Object>> getServiceTree(NuConfigServiceCategory nuConfigServiceCategory) { public List<Map<String, Object>> getServiceTree(NuConfigServiceCategory nuConfigServiceCategory) {
//查询护理类服务
QueryWrapper<NuInstructionTag> instructionTagQueryWrapper = new QueryWrapper<>();
instructionTagQueryWrapper.eq("iz_enabled","0");
instructionTagQueryWrapper.eq("del_flag","0");
instructionTagQueryWrapper.eq("instruction_type","1");
List<NuInstructionTag> instructionTagList = nuInstructionTagService.list(instructionTagQueryWrapper);
Map<String,Object> tagMap = new HashMap<String,Object>();
for(NuInstructionTag par : instructionTagList){
tagMap.put(par.getId(),par.getInstructionName());
}
//查询服务类别数据 //查询服务类别数据
QueryWrapper<NuConfigServiceCategory> categoryQueryWrapper = new QueryWrapper<>(); QueryWrapper<NuConfigServiceCategory> categoryQueryWrapper = new QueryWrapper<>();
@ -59,19 +78,35 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
if(StringUtils.equals(directicePar.getTypeId(),par.getId())){ if(StringUtils.equals(directicePar.getTypeId(),par.getId())){
Map<String,Object> directiceMap = new HashMap<String,Object>(); Map<String,Object> directiceMap = new HashMap<String,Object>();
directiceMap.put("id",directicePar.getId()); directiceMap.put("id",directicePar.getId());
directiceMap.put("levle","3");
directiceMap.put("title",directicePar.getDirectiveName()); directiceMap.put("title",directicePar.getDirectiveName());
directiceMap.put("serviceDuration",directicePar.getServiceDuration()); directiceMap.put("serviceDuration",directicePar.getServiceDuration());
directiceMap.put("tagName",directicePar.getBodyTagName()); directiceMap.put("tagName",directicePar.getBodyTagName());
directiceMap.put("bodyTagName",directicePar.getBodyTagName());
directiceMap.put("emotionTagName",directicePar.getEmotionTagName());
directiceMap.put("cycleType",directicePar.getCycleType()); directiceMap.put("cycleType",directicePar.getCycleType());
if(directicePar.getImmediateFile()!=null){
String immediateFile = getImageNetUrl(directicePar.getImmediateFile());
directiceMap.put("immediateFile",immediateFile);
}else{
directiceMap.put("immediateFile","");
}
if(directicePar.getImmediateFileFocus()!=null){
String immediateFileFocus = getImageNetUrl(directicePar.getImmediateFileFocus());
directiceMap.put("immediateFileFocus",immediateFileFocus);
}else{
directiceMap.put("immediateFileFocus","");
}
directiceMap.put("levle","3");
directiceMapList.add(directiceMap); directiceMapList.add(directiceMap);
} }
} }
wllxMap.put("key",par.getId()); wllxMap.put("key",par.getId());
wllxMap.put("parentId",par.getCategoryId()); wllxMap.put("parentId",par.getCategoryId());
wllxMap.put("title",par.getTypeName()); wllxMap.put("title",par.getTypeName());
wllxMap.put("netFlag",par.getNetFlag());
List<String> imagePaths = new ArrayList<>();
if(par.getAnimationPath()!=null){
imagePaths = getImageNetUrls(par.getAnimationPath());
}
wllxMap.put("animationPath",imagePaths);
wllxMap.put("levle","2"); wllxMap.put("levle","2");
wllxMap.put("children",directiceMapList); wllxMap.put("children",directiceMapList);
typeMapList.add(wllxMap); typeMapList.add(wllxMap);
@ -89,14 +124,62 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
wllxMap2List.add(wllxPar); wllxMap2List.add(wllxPar);
} }
} }
infoMap.put("key",par.getId()); if(tagMap.get(par.getInstructionId())!=null){
infoMap.put("title",par.getCategoryName().substring(0,2));
infoMap.put("levle","1"); infoMap.put("key",par.getId());
infoMap.put("children",wllxMap2List); infoMap.put("title",par.getCategoryName().substring(0,2));
treeList.add(infoMap); infoMap.put("netFlag",par.getNetFlag());
List<String> imagePaths = new ArrayList<>();
if(par.getAnimationPath()!=null){
imagePaths = getImageNetUrls(par.getAnimationPath());
}
infoMap.put("animationPath",imagePaths);
infoMap.put("levle","1");
infoMap.put("children",wllxMap2List);
treeList.add(infoMap);
}
} }
return treeList; return treeList;
} }
/**
* 获取管理平台静态资源路径
* @return
*/
private String getOpeMediaAddress(){
JSONObject json = sysConfigApi.getByKey("ope_media_address");
if(json!=null){
String configValue = json.getString("configValue");
if(!configValue.endsWith("/")){
configValue += "/";
}
return configValue;
}
return "";
}
private String getImageNetUrl(String imageUrl){
String netUrl = "";
String configValue = getOpeMediaAddress();
if(!configValue.equals("")){
netUrl = configValue + imageUrl;
}
return netUrl;
}
private List<String> getImageNetUrls(String imageUrl){
List<String> imagePaths = new ArrayList<>();
String configValue = getOpeMediaAddress();
if(!configValue.equals("")){
String[] urls = imageUrl.split(",");
for (String url : urls) {
if (!url.isEmpty()) {
String netUrl = configValue + url;
imagePaths.add(netUrl);
}
}
}
return imagePaths;
}
} }

View File

@ -0,0 +1,18 @@
package com.nu.modules.nuApiServiceCategory.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
import com.nu.modules.nuApiServiceCategory.mapper.NuInstructionTagMapper;
import com.nu.modules.nuApiServiceCategory.service.INuInstructionTagService;
import org.springframework.stereotype.Service;
/**
* @Description: 分类标签
* @Author: caolei
* @Date: 2025-10-11
* @Version: V1.0
*/
@Service
public class NuInstructionTagServiceImpl extends ServiceImpl<NuInstructionTagMapper, NuInstructionTag> implements INuInstructionTagService {
}

View File

@ -0,0 +1,83 @@
package com.nu.modules.pad.invoicing.api;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nu.entity.*;
import com.nu.modules.invoicing.api.IInvoicingApi;
import io.swagger.annotations.ApiOperation;
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 javax.servlet.http.HttpServletRequest;
import java.util.List;
@RestController
@RequestMapping("/api/pad/invoicing")
public class InvoicingApi {
@Autowired
private IInvoicingApi invoicingApi;
@ApiOperation(value = "查询物料信息-分页列表查询", notes = "查询物料信息-分页列表查询")
@AutoLog(value = "查询物料信息-分页列表查询")
@GetMapping(value = "/queryInvoicingList")
public Result<IPage<MaterialInfoEntity>> queryInvoicingList(MaterialInfoEntity materialInfoEntityDto,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
IPage<MaterialInfoEntity> pageList = invoicingApi.queryInvoicingList(pageNo, pageSize, materialInfoEntityDto,req);
return Result.OK(pageList);
}
@ApiOperation(value = "查询购物车信息-分页列表查询", notes = "查询购物车信息-分页列表查询")
@AutoLog(value = "查询购物车信息-分页列表查询")
@GetMapping(value = "/queryShoppingCartList")
public Result<IPage<QgdInfoEntity>> queryShoppingCartList(QgdInfoEntity qgdInfoEntityDto,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
IPage<QgdInfoEntity> pageList = invoicingApi.queryShoppingCartList(pageNo, pageSize, qgdInfoEntityDto,req);
return Result.OK(pageList);
}
@ApiOperation(value="请购单-请购信息-添加", notes="请购单-请购信息-添加")
@AutoLog(value = "请购单-请购信息-添加")
@PostMapping(value = "/addShoppingCartList")
public Result<String> addShoppingCartList(@RequestBody List<QgdInfoEntity> infoList) {
invoicingApi.addShoppingCartList(infoList);
return Result.OK("添加成功!");
}
@ApiOperation(value="生成采购单信息", notes="生成采购单信息")
@AutoLog(value = "生成采购单信息")
@PostMapping(value = "/generatedPurchaseOrder")
public Result<String> generatedPurchaseOrder(QgdInfoEntity qgdInfoEntity, HttpServletRequest req) {
invoicingApi.generatedPurchaseOrder(qgdInfoEntity);
return Result.OK("已提交采购信息");
}
@ApiOperation(value = "查询采购单详细信息", notes = "查询采购单详细信息")
@AutoLog(value = "查询采购单详细信息")
@GetMapping(value = "/queryCgdInfoList")
public Result<IPage<CgdInfoEntity>> queryCgdInfoList(CgdInfoEntity cgdInfoEntityDto,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
IPage<CgdInfoEntity> pageList = invoicingApi.queryCgdInfoList(pageNo, pageSize, cgdInfoEntityDto,req);
return Result.OK(pageList);
}
@ApiOperation(value="审核采购单信息", notes="审核采购单信息")
@AutoLog(value = "审核采购单信息")
@PostMapping(value = "/reviewPurchaseOrder")
public Result<String> reviewPurchaseOrder(CgdMainEntity cgdMainEntity, HttpServletRequest req) {
invoicingApi.reviewPurchaseOrder(cgdMainEntity);
return Result.OK("操作成功");
}
}

View File

@ -90,6 +90,7 @@ public class ShiroConfig {
} }
filterChainDefinitionMap.put("/api/tplink/videoStorage/**", "anon"); //视频缓存存储接口 filterChainDefinitionMap.put("/api/tplink/videoStorage/**", "anon"); //视频缓存存储接口
filterChainDefinitionMap.put("/api/pad/invoicing/**", "anon"); //测试进销存对应的接口
filterChainDefinitionMap.put("/iot/tq/api/electricityMeter/**", "anon"); //电表回调 filterChainDefinitionMap.put("/iot/tq/api/electricityMeter/**", "anon"); //电表回调
filterChainDefinitionMap.put("/api/pad/baseInfo/**", "anon"); //电表回调 filterChainDefinitionMap.put("/api/pad/baseInfo/**", "anon"); //电表回调
filterChainDefinitionMap.put("/iot/tq/api/waterMeter/**", "anon"); //水表回调 filterChainDefinitionMap.put("/iot/tq/api/waterMeter/**", "anon"); //水表回调

View File

@ -42,4 +42,9 @@ public class CategoryMQDto implements Serializable {
* 是否删除 0未删除 1删除 * 是否删除 0未删除 1删除
*/ */
private String delFlag; private String delFlag;
/**
* 动画图片
*/
private String animationPath;
} }

View File

@ -21,6 +21,10 @@ public class InstructionTagMQDto implements Serializable {
* 分类标签名称 * 分类标签名称
*/ */
private String instructionName; private String instructionName;
/**
* 分类标签类型
*/
private String instructionType;
/** /**
* 排序 * 排序
*/ */

View File

@ -0,0 +1,79 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
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 org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: nu_invoicing_cgd_info
* @Author: jeecg-boot
* @Date: 2025-09-26
* @Version: V1.0
*/
@Data
public class CgdInfoEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**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;
/**sysOrgCode*/
private String sysOrgCode;
/**请购单id*/
private String mainId;
/**采购单id*/
private String cgdId;
/**物料id*/
private String wlId;
/**物料编码*/
private String wlMaterialNo;
/**物料名称*/
private String wlName;
/**采购单位*/
private String wlUnits;
/**规格型号*/
private String wlSpecificationModel;
/**上限*/
private String wlUpperLimit;
/**下限*/
private String wlLowerLimit;
/**供应商id*/
private String suppliersId;
/**供应商名称*/
private String suppliersName;
/**请购数量*/
private Integer purchaseQuantity;
/**银行*/
private String brand;
/**库房*/
private String nuId;
/**入库数量*/
private String rksl;
/**未入库数量*/
private String wrksl;
/**采购单价*/
private String procurementPrice;
/**到货单间*/
private String arrivalPrice;
}

View File

@ -0,0 +1,77 @@
package com.nu.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Description: nu_invoicing_cgd_main
* @Author: jeecg-boot
* @Date: 2025-09-26
* @Version: V1.0
*/
@Data
public class CgdMainEntity 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*/
private String qgdId;
/**采购单单号*/
private String cgdNo;
/**供应商id*/
private String gysId;
/**请购时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date qgDate;
/**请购人*/
private String qgBy;
/**供应商联系人*/
private String gysLxr;
/**供应商联系电话*/
private String gysLxrdh;
/**供应商openId*/
private String gysOpenId;
/**付款方式*/
private String gysFkfs;
/**状态 0:待采购 1采购中 2采购完成 3作废*/
private String status;
/**采购单类型 0采购单 1挂帐单 2结账单 9作废*/
@Dict(dicCode = "cgd_type")
private String cgdType;
/**随行单*/
private String sxdPath;
/**销账单*/
private String xzdPath;
/**结账单*/
private String jzdPath;
/**审核人*/
private String reviewedBy;
/**审核时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date reviewedTime;
/**审核备注*/
private String content;
private List<CgdInfoEntity> cgdInfoList;
}

View File

@ -0,0 +1,63 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 物料类别
* @Author: jeecg-boot
* @Date: 2025-03-17
* @Version: V1.0
*/
@Data
public class MaterialCategoryEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**物料类别名称*/
private String categoryName;
/**是否启用 0启用 1未启用*/
@Dict(dicCode = "iz_enabled")
private String izEnabled;
/**是否删除 0未删除 1删除*/
private String delFlag;
/**创建人*/
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;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**所属部门*/
private String sysOrgCode;
private String icon;
private Integer sort;
private String typeName;
private String medicationName;
private String categoryId;
private String typeId;
private String medicationId;
private Integer categoryRowSpan;
private Integer typeRowSpan;
private Integer num;
}

View File

@ -0,0 +1,106 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 物料信息
* @Author: jeecg-boot
* @Date: 2025-03-13
* @Version: V1.0
*/
@Data
public class MaterialInfoEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**物料类别*/
@Dict(dictTable = "nu_config_material_category", dicText = "category_name", dicCode = "id")
private String categoryId;
/**物料类型*/
@Dict(dictTable = "nu_config_material_type", dicText = "type_name", dicCode = "id")
private String typeId;
/**用药类型*/
@Dict(dictTable = "nu_config_material_medication", dicText = "medication_name", dicCode = "id")
private String medicationId;
/**货品名称*/
private String materialName;
/**货品编码*/
private String materialNo;
/**规格型号*/
private String specificationModel;
/**销售单价*/
private BigDecimal salesUnitPrice;
/**参考单价*/
private BigDecimal referenceUnitPrice;
/**货品单位*/
private String materialUnits;
/**多单位开关 0关 1开*/
private String multiUnitSwitch;
/**父级单位*/
private String oneUnit;
/**父级单位兑换比例*/
private Integer oneUnitProportion;
/**父级单位价格*/
private BigDecimal oneUnitPrice;
/**爷级单位*/
private String twoUnit;
/**爷级单位兑换比例*/
private Integer twoUnitProportion;
/**爷级单位价格*/
private BigDecimal twoUnitPrice;
/**多单位采购默认使用 0子集 1父级 2爷级*/
private String multiUnitType;
/**供应商*/
@Dict(dictTable = "nu_config_suppliers_info" , dicCode = "id" , dicText = "suppliers_name")
private String suppliers;
/**物料图片*/
private String materialImg;
/**物料标识*/
private String materialIdent;
/**是否启用 0启用 1未启用*/
@Dict(dicCode = "iz_enabled")
private String izEnabled;
/**是否删除 0未删除 1删除*/
private String delFlag;
/**创建人*/
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;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**所属部门*/
private String sysOrgCode;
/**拼音*/
private String pinyin;
/**物料上限*/
private String upperLimit;
/**物料下县*/
private String lowerLimit;
private String treeId;//树id用于查询
private String kcsl;//库存数量
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id")
private String nuId;//库房id
}

View File

@ -0,0 +1,64 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 物料用药类型
* @Author: jeecg-boot
* @Date: 2025-03-17
* @Version: V1.0
*/
@Data
public class MaterialMedicationEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**物料类别*/
@Dict(dictTable = "nu_config_material_category", dicText = "category_name", dicCode = "id")
private String categoryId;
/**物料类型*/
@Dict(dictTable = "nu_config_material_type", dicText = "type_name", dicCode = "id")
private String typeId;
/**名称*/
private String medicationName;
/**是否启用 0启用 1未启用*/
@Dict(dicCode = "iz_enabled")
private String izEnabled;
/**是否删除 0未删除 1删除*/
@TableLogic
private String delFlag;
/**创建人*/
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;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**所属部门*/
private String sysOrgCode;
private String icon;
private String levle;//当前所在层级 1一级 2二级 3三级
private String qycj;//迁移至第几层 0三级 1二级 2一级
}

View File

@ -0,0 +1,57 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 物料类型
* @Author: jeecg-boot
* @Date: 2025-03-17
* @Version: V1.0
*/
@Data
public class MaterialTypeEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**物料类别*/
@Dict(dictTable = "nu_config_material_category" , dicText = "category_name" , dicCode = "id")
private String categoryId;
/**物料类型*/
private String typeName;
/**是否启用 0启用 1未启用*/
@Dict(dicCode = "iz_enabled")
private String izEnabled;
/**是否删除 0未删除 1删除*/
@TableLogic
private String delFlag;
/**创建人*/
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;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**所属部门*/
private String sysOrgCode;
private String icon;
private Integer num;
}

View File

@ -0,0 +1,78 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.List;
/**
* @Description: 请购单-请购信息
* @Author: jeecg-boot
* @Date: 2025-06-26
* @Version: V1.0
*/
@Data
public class QgdInfoEntity 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 java.util.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 java.util.Date updateTime;
/**sysOrgCode*/
private String sysOrgCode;
/**请购单id*/
private String mainId;
/**请购单编号*/
private String mainNo;
/**物料id*/
private String wlId;
/**物料编码*/
private String wlMaterialNo;
/**物料名称*/
private String wlName;
/**采购单位*/
private String wlUnits;
/**规格型号*/
private String wlSpecificationModel;
/**上限*/
private String wlUpperLimit;
/**下限*/
private String wlLowerLimit;
/**供应商id*/
private String suppliersId;
/**供应商名称*/
private String suppliersName;
/**请购数量*/
private Integer purchaseQuantity;
/**brand*/
private String brand;
/**库房*/
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id")
private String nuId;
/**参考单价*/
private String referenceUnitPrice;
}

View File

@ -0,0 +1,47 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
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 org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 请购单
* @Author: jeecg-boot
* @Date: 2025-06-26
* @Version: V1.0
*/
@Data
public class QgdMainEntity 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 java.util.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 java.util.Date updateTime;
/**sysOrgCode*/
private String sysOrgCode;
/**请购单号*/
private String qgdNo;
/**请购状态 0未下单 1已下单*/
private Integer status;
}

View File

@ -7,6 +7,12 @@
<artifactId>nu-invoicing-api</artifactId> <artifactId>nu-invoicing-api</artifactId>
<version>2.0.0</version> <version>2.0.0</version>
</parent> </parent>
<dependencies>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-common</artifactId>
</dependency>
</dependencies>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>nu-invoicing-local-api</artifactId> <artifactId>nu-invoicing-local-api</artifactId>

View File

@ -0,0 +1,25 @@
package com.nu.modules.invoicing.api;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nu.entity.CgdInfoEntity;
import com.nu.entity.CgdMainEntity;
import com.nu.entity.MaterialInfoEntity;
import com.nu.entity.QgdInfoEntity;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
public interface IInvoicingApi {
IPage<MaterialInfoEntity> queryInvoicingList(Integer pageNo, Integer pageSize, MaterialInfoEntity materialInfoEntityDto, HttpServletRequest req);
IPage<QgdInfoEntity> queryShoppingCartList(Integer pageNo, Integer pageSize, QgdInfoEntity qgdInfoEntityDto, HttpServletRequest req);
void addShoppingCartList(List<QgdInfoEntity> infoList);
String generatedPurchaseOrder(QgdInfoEntity qgdInfoEntity);
IPage<CgdInfoEntity> queryCgdInfoList(Integer pageNo, Integer pageSize, CgdInfoEntity cgdInfoEntityDto, HttpServletRequest req);
void reviewPurchaseOrder(CgdMainEntity cgdMainEntity);
}

View File

@ -183,7 +183,7 @@ public class NuInvoicingCgdMainController extends JeecgController<NuInvoicingCgd
@RequiresPermissions("cgd:nu_invoicing_cgd_main:add") @RequiresPermissions("cgd:nu_invoicing_cgd_main:add")
@PostMapping(value = "/auditInfo") @PostMapping(value = "/auditInfo")
public Result<String> auditInfo(@RequestBody NuInvoicingCgdMain nuInvoicingCgdMain) { public Result<String> auditInfo(@RequestBody NuInvoicingCgdMain nuInvoicingCgdMain) {
nuInvoicingCgdMainService.updateById(nuInvoicingCgdMain); nuInvoicingCgdMainService.auditInfo(nuInvoicingCgdMain);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

View File

@ -12,4 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface INuInvoicingCgdMainService extends IService<NuInvoicingCgdMain> { public interface INuInvoicingCgdMainService extends IService<NuInvoicingCgdMain> {
void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain); void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain);
void auditInfo(NuInvoicingCgdMain nuInvoicingCgdMain);
} }

View File

@ -1,21 +1,42 @@
package com.nu.modules.cgd.service.impl; package com.nu.modules.cgd.service.impl;
import cn.hutool.core.bean.BeanUtil;
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.entity.*;
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialInfoMapper;
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo; import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
import com.nu.modules.cgd.entity.NuInvoicingCgdMain; import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
import com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper; import com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper;
import com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper; import com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper;
import com.nu.modules.cgd.service.INuInvoicingCgdMainService; import com.nu.modules.cgd.service.INuInvoicingCgdMainService;
import com.nu.modules.configSuppliersInfo.entity.ConfigSuppliersInfo;
import com.nu.modules.configSuppliersInfo.mapper.ConfigSuppliersInfoMapper;
import com.nu.modules.invoicing.api.IInvoicingApi;
import com.nu.modules.qgd.entity.QgdInfo;
import com.nu.modules.qgd.entity.QgdMain;
import com.nu.modules.qgd.mapper.QgdInfoMapper;
import com.nu.modules.qgd.mapper.QgdMainMapper;
import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo;
import com.nu.modules.warehouseMaterialInfo.mapper.BlWarehouseMaterialInfoMapper;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
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.system.vo.LoginUser;
import org.jeecg.common.util.DateUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Random;
/** /**
* @Description: nu_invoicing_cgd_main * @Description: nu_invoicing_cgd_main
@ -24,11 +45,29 @@ import java.util.Random;
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMainMapper, NuInvoicingCgdMain> implements INuInvoicingCgdMainService { public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMainMapper, NuInvoicingCgdMain> implements INuInvoicingCgdMainService, IInvoicingApi {
@Autowired @Autowired
private NuInvoicingCgdInfoMapper cgdInfoMapper; private NuInvoicingCgdInfoMapper cgdInfoMapper;
@Autowired
private NuInvoicingCgdMainMapper cgdMainMapper;
@Autowired
private BlWarehouseMaterialInfoMapper warehouseMaterialInfoMapper;
@Autowired
private ConfigMaterialInfoMapper configMaterialInfoMapper;
@Autowired
private QgdMainMapper qgdMainMapper;
@Autowired
private QgdInfoMapper qgdInfoMapper;
@Autowired
private ConfigSuppliersInfoMapper gysMapper;
@Override @Override
public void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain) { public void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain) {
@ -67,4 +106,224 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
} }
} }
} }
@Override
public void auditInfo(NuInvoicingCgdMain nuInvoicingCgdMain) {
cgdInfoMapper.delete(new QueryWrapper<NuInvoicingCgdInfo>().eq("cgd_id",nuInvoicingCgdMain.getId()));
for(NuInvoicingCgdInfo nuInvoicingCgdInfo : nuInvoicingCgdMain.getCgdInfoList()){
cgdInfoMapper.insert(nuInvoicingCgdInfo);
}
baseMapper.updateById(nuInvoicingCgdMain);
}
//--------------------------------------------------pad 接口-------------------------------------------------
@Override
public IPage<MaterialInfoEntity> queryInvoicingList(Integer pageNo, Integer pageSize, MaterialInfoEntity materialInfoEntityDto, HttpServletRequest req) {
BlWarehouseMaterialInfo warehouseMaterialInfo = new BlWarehouseMaterialInfo();
BeanUtils.copyProperties(materialInfoEntityDto,warehouseMaterialInfo);
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
QueryWrapper<BlWarehouseMaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(warehouseMaterialInfo, req.getParameterMap(), customeRuleMap);
Page<BlWarehouseMaterialInfo> page = new Page<>(pageNo, pageSize);
List<BlWarehouseMaterialInfo> list = warehouseMaterialInfoMapper.selectList(page,queryWrapper);
IPage<MaterialInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
entityPage.setRecords(BeanUtil.copyToList(list, MaterialInfoEntity.class));
return entityPage;
}
@Override
public IPage<QgdInfoEntity> queryShoppingCartList(Integer pageNo, Integer pageSize, QgdInfoEntity qgdInfoEntityDto, HttpServletRequest req) {
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//查询当前人是否有请购数据
QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>();
// mainQueryWrapper.eq("create_by",sysUser.getUsername());
mainQueryWrapper.eq("status",0);
QgdMain qgdMain = qgdMainMapper.selectOne(mainQueryWrapper);
//如果请购单为空给一个默认的值使最后的结果为空
if(qgdMain == null){
qgdMain = new QgdMain();
qgdMain.setId("-1");//默认没有请购单
}
//查询请购详细信息
QgdInfo nuInvoicingQgdInfo = new QgdInfo();
BeanUtils.copyProperties(qgdInfoEntityDto,nuInvoicingQgdInfo);
QueryWrapper<QgdInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingQgdInfo, req.getParameterMap());
queryWrapper.eq("main_id",qgdMain.getId());
Page<QgdInfo> page = new Page<QgdInfo>(pageNo, pageSize);
List<QgdInfo> list = qgdInfoMapper.selectList(page, queryWrapper);
//封装返回结果
IPage<QgdInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
entityPage.setRecords(BeanUtil.copyToList(list, QgdInfoEntity.class));
return entityPage;
}
@Override
public void addShoppingCartList(List<QgdInfoEntity> infoList) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<QgdMain> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("create_by",sysUser.getUsername());
queryWrapper.eq("status",0);
QgdMain qgdMain = qgdMainMapper.selectOne(queryWrapper);
if(qgdMain == null){
// 生成请购单号
Date date = new Date();
// String nowDate = DateUtils.formatDate(date,"yyyy-MM-dd");
QueryWrapper<QgdMain> queryWrapper2 = new QueryWrapper<>();
// queryWrapper2.eq("create_by",sysUser.getUsername());
// queryWrapper2.like("create_time",nowDate);
//查询当天是否有请购单
List<QgdMain> listSize = qgdMainMapper.selectList(queryWrapper2);
int size = listSize.size()+1;
String ddwh = String.format("%03d", size);
String qgdNo = sysUser.getOrgCode() + DateUtils.formatDate(date,"yyyyMMdd")+ddwh;
qgdMain = new QgdMain();
qgdMain.setCreateBy(sysUser.getUsername());
qgdMain.setCreateTime(new Date());
qgdMain.setStatus(0);
qgdMain.setQgdNo(qgdNo);
qgdMainMapper.insert(qgdMain);
}
for (QgdInfoEntity info : infoList) {
if(info.getPurchaseQuantity()!=null && info.getPurchaseQuantity()>0){
//获取物料基础信息
ConfigMaterialInfo ConfigMaterialInfo = configMaterialInfoMapper.selectById(info.getWlId());
//获取物料上限下限
BlWarehouseMaterialInfo warehouseMaterialInfo = warehouseMaterialInfoMapper.selectOne(new QueryWrapper<BlWarehouseMaterialInfo>().eq("wl_id",info.getWlId()).eq("nu_id",info.getNuId()));
info.setMainId(qgdMain.getId());
info.setMainNo(qgdMain.getQgdNo());
info.setWlName(ConfigMaterialInfo.getMaterialName());
info.setWlMaterialNo(ConfigMaterialInfo.getMaterialNo());
info.setWlSpecificationModel(ConfigMaterialInfo.getSpecificationModel());
info.setWlUnits(ConfigMaterialInfo.getMaterialUnits());
info.setWlUpperLimit(warehouseMaterialInfo.getUpperLimit());
info.setWlLowerLimit(warehouseMaterialInfo.getLowerLimit());
if(StringUtils.equals("1",ConfigMaterialInfo.getMultiUnitType())){
info.setReferenceUnitPrice(ConfigMaterialInfo.getOneUnitPrice()+"");
}else if(StringUtils.equals("2",ConfigMaterialInfo.getMultiUnitType())){
info.setReferenceUnitPrice(ConfigMaterialInfo.getTwoUnitPrice()+"");
} else if(StringUtils.equals("3",ConfigMaterialInfo.getMultiUnitType())){
info.setReferenceUnitPrice(ConfigMaterialInfo.getReferenceUnitPrice()+"");
}
QgdInfo qgdInfo = new QgdInfo();
BeanUtils.copyProperties(info,qgdInfo);
qgdInfoMapper.insert(qgdInfo);
}
}
}
@Override
public String generatedPurchaseOrder(QgdInfoEntity qgdInfoEntity) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//查询当前人是否有请购数据
QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>();
// mainQueryWrapper.eq("create_by",sysUser.getUsername());
mainQueryWrapper.eq("status",0);
QgdMain qgdMain = qgdMainMapper.selectOne(mainQueryWrapper);
if(qgdMain == null){
qgdMain = new QgdMain();
qgdMain.setId("-1");
}
//查询请购详细信息
QueryWrapper<QgdInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("main_id",qgdMain.getId());
List<QgdInfo> qgdInfoList = qgdInfoMapper.selectList(queryWrapper);
List<Map<String,Object>> mapList = new ArrayList<>();
// 创建一个临时Map来按suppliersId分组
Map<String, List<QgdInfo>> tempMap = new HashMap<>();
for (QgdInfo qgdInfo : qgdInfoList) {
String suppliersId = qgdInfo.getSuppliersId();
if (!tempMap.containsKey(suppliersId)) {
tempMap.put(suppliersId, new ArrayList<>());
}
tempMap.get(suppliersId).add(qgdInfo);
}
// 将临时Map转换为需要的mapList结构
for (Map.Entry<String, List<QgdInfo>> entry : tempMap.entrySet()) {
Map<String, Object> map = new HashMap<>();
String suppliersId = entry.getKey();//供应商id
List<QgdInfo> infoList = entry.getValue();//请购的物料列表
ConfigSuppliersInfo ConfigSuppliersInfo = gysMapper.selectById(suppliersId);
String cgdNo = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + String.format("%06d", new Random().nextInt(1000000));
//生产采购单主表
NuInvoicingCgdMain cgdMain = new NuInvoicingCgdMain();
cgdMain.setQgdId(qgdMain.getId());
cgdMain.setCgdNo(cgdNo);
cgdMain.setGysId(suppliersId);
cgdMain.setQgDate(new Date());
cgdMain.setQgBy(sysUser.getUsername());
cgdMain.setGysLxr(ConfigSuppliersInfo.getPersonInCharge());
cgdMain.setGysLxrdh(ConfigSuppliersInfo.getContactNumber());
cgdMain.setGysOpenId(ConfigSuppliersInfo.getWechartId());
cgdMain.setStatus("0");
cgdMain.setCgdType("0");
cgdMainMapper.insert(cgdMain);
//生产采购单详细
for(QgdInfo params:infoList){
NuInvoicingCgdInfo cgdInfo = new NuInvoicingCgdInfo();
cgdInfo.setMainId(qgdMain.getId());
cgdInfo.setCgdId(cgdMain.getId());
cgdInfo.setWlId(params.getWlId());
cgdInfo.setWlMaterialNo(params.getWlMaterialNo());
cgdInfo.setWlName(params.getWlName());
cgdInfo.setWlUnits(params.getWlUnits());
cgdInfo.setWlSpecificationModel(params.getWlSpecificationModel());
cgdInfo.setWlUpperLimit(params.getWlUpperLimit());
cgdInfo.setWlLowerLimit(params.getWlLowerLimit());
cgdInfo.setSuppliersId(params.getSuppliersId());
cgdInfo.setSuppliersName(params.getSuppliersName());
cgdInfo.setPurchaseQuantity(params.getPurchaseQuantity());
cgdInfo.setBrand(params.getBrand());
cgdInfo.setNuId(params.getNuId());
cgdInfo.setProcurementPrice(params.getReferenceUnitPrice());
cgdInfoMapper.insert(cgdInfo);
}
map.put("suppliersId", entry.getKey());
map.put("qgdInfoList", entry.getValue());
mapList.add(map);
}
System.out.println(mapList);
//修改请购单状态-变成已经下单
QgdMain qgdMain1 = new QgdMain();
qgdMain1.setId(qgdMain.getId());
qgdMain1.setStatus(1);
qgdMainMapper.updateById(qgdMain1);
return "1";
}
@Override
public IPage<CgdInfoEntity> queryCgdInfoList(Integer pageNo, Integer pageSize, CgdInfoEntity cgdInfoEntityDto, HttpServletRequest req) {
NuInvoicingCgdInfo nuInvoicingCgdInfo = new NuInvoicingCgdInfo();
BeanUtils.copyProperties(cgdInfoEntityDto,nuInvoicingCgdInfo);
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
QueryWrapper<NuInvoicingCgdInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdInfo, req.getParameterMap(), customeRuleMap);
Page<NuInvoicingCgdInfo> page = new Page<>(pageNo, pageSize);
List<NuInvoicingCgdInfo> list = cgdInfoMapper.selectList(page,queryWrapper);
IPage<CgdInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
entityPage.setRecords(BeanUtil.copyToList(list, CgdInfoEntity.class));
return entityPage;
}
@Override
public void reviewPurchaseOrder(CgdMainEntity cgdMainEntity) {
NuInvoicingCgdMain cgdMain = new NuInvoicingCgdMain();
BeanUtils.copyProperties(cgdMainEntity,cgdMain);
cgdInfoMapper.delete(new QueryWrapper<NuInvoicingCgdInfo>().eq("cgd_id",cgdMainEntity.getId()));
for(CgdInfoEntity cgdInfoEntity : cgdMainEntity.getCgdInfoList()){
NuInvoicingCgdInfo nuInvoicingCgdInfo = new NuInvoicingCgdInfo();
BeanUtils.copyProperties(cgdInfoEntity,nuInvoicingCgdInfo);
cgdInfoMapper.insert(nuInvoicingCgdInfo);
}
baseMapper.updateById(cgdMain);
}
} }

View File

@ -141,10 +141,10 @@ public class QgdInfoController extends JeecgController<QgdInfo, IQgdInfoService>
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//查询当前人是否有请购数据 //查询当前人是否有请购数据
QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>(); QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>();
mainQueryWrapper.eq("create_by",sysUser.getUsername()); // mainQueryWrapper.eq("create_by",sysUser.getUsername());//目前请购是一次性全部将请购车的请购信息全部提交给采购如果只查询本人的请购信息则解除注释
mainQueryWrapper.eq("status",0); mainQueryWrapper.eq("status",0);
QgdMain qgdMain = nuInvoicingQgdMainService.getOne(mainQueryWrapper); QgdMain qgdMain = nuInvoicingQgdMainService.getOne(mainQueryWrapper);
if(qgdMain == null){ if(qgdMain == null){
@ -159,6 +159,7 @@ public class QgdInfoController extends JeecgController<QgdInfo, IQgdInfoService>
} }
@ApiOperation(value="生成采购单信息", notes="生成采购单信息")
@PostMapping(value = "/addCgdByUser") @PostMapping(value = "/addCgdByUser")
public Result<String> addCgd(QgdInfo nuInvoicingQgdInfo, HttpServletRequest req) { public Result<String> addCgd(QgdInfo nuInvoicingQgdInfo, HttpServletRequest req) {
nuInvoicingQgdMainService.addCgdByUser(nuInvoicingQgdInfo); nuInvoicingQgdMainService.addCgdByUser(nuInvoicingQgdInfo);

View File

@ -43,16 +43,16 @@ public class QgdInfoServiceImpl extends ServiceImpl<QgdInfoMapper, QgdInfo> impl
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<QgdMain> queryWrapper = new QueryWrapper<>(); QueryWrapper<QgdMain> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("create_by",sysUser.getUsername()); // queryWrapper.eq("create_by",sysUser.getUsername());
queryWrapper.eq("status",0); queryWrapper.eq("status",0);
QgdMain qgdMain = nuInvoicingQgdMainService.getOne(queryWrapper); QgdMain qgdMain = nuInvoicingQgdMainService.getOne(queryWrapper);
if(qgdMain == null){ if(qgdMain == null){
// 生成请购单号 // 生成请购单号
Date date = new Date(); Date date = new Date();
String nowDate = DateUtils.formatDate(date,"yyyy-MM-dd"); // String nowDate = DateUtils.formatDate(date,"yyyy-MM-dd");
QueryWrapper<QgdMain> queryWrapper2 = new QueryWrapper<>(); QueryWrapper<QgdMain> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.eq("create_by",sysUser.getUsername()); // queryWrapper2.eq("create_by",sysUser.getUsername());
queryWrapper2.like("create_time",nowDate); // queryWrapper2.like("create_time",nowDate);
//查询当天是否有请购单 //查询当天是否有请购单
List<QgdMain> listSize = nuInvoicingQgdMainService.list(queryWrapper2); List<QgdMain> listSize = nuInvoicingQgdMainService.list(queryWrapper2);
int size = listSize.size()+1; int size = listSize.size()+1;

View File

@ -52,7 +52,7 @@ public class QgdMainServiceImpl extends ServiceImpl<QgdMainMapper, QgdMain> impl
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//查询当前人是否有请购数据 //查询当前人是否有请购数据
QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>(); QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>();
mainQueryWrapper.eq("create_by",sysUser.getUsername()); // mainQueryWrapper.eq("create_by",sysUser.getUsername());
mainQueryWrapper.eq("status",0); mainQueryWrapper.eq("status",0);
QgdMain qgdMain = baseMapper.selectOne(mainQueryWrapper); QgdMain qgdMain = baseMapper.selectOne(mainQueryWrapper);
if(qgdMain == null){ if(qgdMain == null){

View File

@ -2,6 +2,8 @@ package com.nu.modules.warehouseMaterialInfo.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo; import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface BlWarehouseMaterialInfoMapper extends BaseMapper<BlWarehouseMaterialInfo> { public interface BlWarehouseMaterialInfoMapper extends BaseMapper<BlWarehouseMaterialInfo> {
List<BlWarehouseMaterialInfo> queryInvoicingList(Page<BlWarehouseMaterialInfo> page, QueryWrapper<BlWarehouseMaterialInfo> queryWrapper);
} }

View File

@ -42,6 +42,10 @@ public class InstructionTag implements Serializable {
@Excel(name = "分类标签名称", width = 15) @Excel(name = "分类标签名称", width = 15)
@ApiModelProperty(value = "分类标签名称") @ApiModelProperty(value = "分类标签名称")
private java.lang.String instructionName; private java.lang.String instructionName;
@Excel(name = "分类标签类型", width = 15)
@ApiModelProperty(value = "分类标签类型")
@Dict(dicCode = "service_instruction_tag")
private java.lang.String instructionType;
/**排序*/ /**排序*/
@Excel(name = "排序", width = 15) @Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")

View File

@ -68,6 +68,22 @@ public class ConfigServiceCategoryController extends JeecgController<ConfigServi
return Result.OK(pageList); return Result.OK(pageList);
} }
/**
* 实体查询
*
* @param id
* @return
*/
//@AutoLog(value = "服务类别-分页列表查询")
@ApiOperation(value="服务类别-实体查询", notes="服务类别-实体查询")
@GetMapping(value = "/getInfo")
public Result<ConfigServiceCategory> getInfo(@RequestParam(name="id",required=true) String id) {
QueryWrapper<ConfigServiceCategory> queryWrapper = new QueryWrapper();
queryWrapper.eq("id",id);
ConfigServiceCategory entity = configServiceCategoryService.getOne(queryWrapper);
return Result.OK(entity);
}
/** /**
* 添加 * 添加
* *

View File

@ -81,4 +81,10 @@ public class ConfigServiceCategory implements Serializable {
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**网络标记0为用pad本地静态图片1为用网络图*/
@ApiModelProperty(value = "网络标记")
private java.lang.String netFlag;
/**动画图片*/
@ApiModelProperty(value = "动画图片")
private java.lang.String animationPath;
} }

View File

@ -26,4 +26,5 @@ public interface IConfigServiceCategoryService extends IService<ConfigServiceCat
List<ConfigServiceCategory> selectAll(String dataSourceCode, List<String> ids, List<String> excludeSubIds); List<ConfigServiceCategory> selectAll(String dataSourceCode, List<String> ids, List<String> excludeSubIds);
void insertAll(List<ConfigServiceCategory> categoryList); void insertAll(List<ConfigServiceCategory> categoryList);
void updateAll(List<ConfigServiceCategory> categoryList);
} }

View File

@ -76,4 +76,14 @@ public class ConfigServiceCategoryServiceImpl extends ServiceImpl<ConfigServiceC
baseMapper.insert(c); baseMapper.insert(c);
}); });
} }
@Override
public void updateAll(List<ConfigServiceCategory> categoryList) {
categoryList.forEach(c -> {
ConfigServiceCategory entity = new ConfigServiceCategory();
entity.setId(c.getId());
entity.setAnimationPath(c.getAnimationPath());
baseMapper.updateById(entity);
});
}
} }

View File

@ -70,6 +70,22 @@ public class ConfigServiceTypeController extends JeecgController<ConfigServiceTy
return Result.OK(pageList); return Result.OK(pageList);
} }
/**
* 实体查询
*
* @param id
* @return
*/
//@AutoLog(value = "服务类型-分页列表查询")
@ApiOperation(value="服务类别-实体查询", notes="服务类别-实体查询")
@GetMapping(value = "/getInfo")
public Result<ConfigServiceType> getInfo(@RequestParam(name="id",required=true) String id) {
QueryWrapper<ConfigServiceType> queryWrapper = new QueryWrapper();
queryWrapper.eq("id",id);
ConfigServiceType entity = configServiceTypeService.getOne(queryWrapper);
return Result.OK(entity);
}
/** /**
* 添加 * 添加
* *

View File

@ -86,4 +86,10 @@ public class ConfigServiceType implements Serializable {
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**网络标记0为用pad本地静态图片1为用网络图*/
@ApiModelProperty(value = "网络标记")
private java.lang.String netFlag;
/**动画图片*/
@ApiModelProperty(value = "动画图片")
private java.lang.String animationPath;
} }

View File

@ -734,14 +734,20 @@ public class DirectiveMQListener {
//需要新增的数据 //需要新增的数据
List<ConfigServiceCategory> needAddData = Lists.newArrayList(); List<ConfigServiceCategory> needAddData = Lists.newArrayList();
List<ConfigServiceCategory> needUpdateData = Lists.newArrayList();
for (ConfigServiceCategory category : allData) { for (ConfigServiceCategory category : allData) {
if (!existedIds.contains(category.getId())) { if (!existedIds.contains(category.getId())) {
needAddData.add(category); needAddData.add(category);
}else{
needUpdateData.add(category);
} }
} }
if (needAddData != null && !needAddData.isEmpty()) { if (needAddData != null && !needAddData.isEmpty()) {
serviceCategoryService.insertAll(needAddData); serviceCategoryService.insertAll(needAddData);
} }
if (needUpdateData != null && !needUpdateData.isEmpty()) {
serviceCategoryService.updateAll(needUpdateData);
}
} }
//服务类型 //服务类型
if (dto.getTypeList() != null) { if (dto.getTypeList() != null) {