添加pad获取首页老人的服务指令信息
This commit is contained in:
parent
ddae5647b1
commit
fa520d1cfa
|
|
@ -0,0 +1,74 @@
|
|||
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: yangjun
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ElderServerEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**客户id*/
|
||||
private String customerId;
|
||||
/**服务类别id*/
|
||||
private String categoryId;
|
||||
/**服务类型id*/
|
||||
private String typeId;
|
||||
/**服务指令id*/
|
||||
private String directiveId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**客户姓名*/
|
||||
private String customerName;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令名称*/
|
||||
private String directiveName;
|
||||
/**定位*/
|
||||
private String positioning;
|
||||
/**服务标签名称*/
|
||||
private String tagName;
|
||||
/**体型标签名称*/
|
||||
private String bodyTagName;
|
||||
/**情绪标签名称*/
|
||||
private String emotionTagName;
|
||||
/**周期类型*/
|
||||
private String cycleType;
|
||||
/**纵向定位*/
|
||||
private String positioningLong;
|
||||
|
||||
|
||||
/**开始时间*/
|
||||
private String startTime;
|
||||
/**结束时间*/
|
||||
private String endTime;
|
||||
/**创建人*/
|
||||
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;
|
||||
}
|
||||
|
|
@ -83,10 +83,8 @@ public class NuBaseInfoEntity implements Serializable {
|
|||
private BigDecimal balance;
|
||||
//摄像头信息
|
||||
private List<CameraInfoEntity> cameraInfo;
|
||||
//客户信息
|
||||
private CustomerInfoEntity customerInfo;
|
||||
//指令信息
|
||||
private List<CustomerDirectiveEntity> customerDirectiveDtoList;
|
||||
private List<ElderServerEntity> elderServerEntityList;
|
||||
//温湿度信息 正常一个nuid对应一条数据
|
||||
private List<HumidDeviceEntity> humidDeviceList;
|
||||
//长者信息
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.nu.modules.elder.api;
|
||||
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.ElderServerEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -14,4 +15,5 @@ public interface IElderInfoApi {
|
|||
|
||||
List<ElderInfoEntity> queryByElderIds(String[] split);
|
||||
|
||||
List<ElderServerEntity> getElderServerList(ElderInfoEntity customerInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
package com.nu.modules.elderinfo.mapper;
|
||||
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.ElderServerEntity;
|
||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 长者信息
|
||||
|
|
@ -11,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface ElderInfoMapper extends BaseMapper<ElderInfo> {
|
||||
|
||||
List<ElderServerEntity> getElderServerList(@Param("params") ElderInfoEntity elderInfoEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,4 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.elderinfo.mapper.ElderInfoMapper">
|
||||
|
||||
<select id="getElderServerList" resultType="com.nu.entity.ElderServerEntity">
|
||||
select * from nu_biz_nu_customer_server where nu_id = #{params.nuId} and customer_id = #{params.id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.nu.dto.ElderInfoMQDto;
|
||||
import com.nu.dto.EmployeesApplyMQDto;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.ElderServerEntity;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.nu.modules.elderinfo.mapper.ElderInfoMapper;
|
||||
|
|
@ -283,4 +284,9 @@ public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo
|
|||
return BeanUtil.copyToList(baseMapper.selectList(qw), ElderInfoEntity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ElderServerEntity> getElderServerList(ElderInfoEntity elderInfoEntity) {
|
||||
return baseMapper.getElderServerList(elderInfoEntity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,4 +110,7 @@ public class QgdInfo implements Serializable {
|
|||
@ApiModelProperty(value = "库房")
|
||||
private java.lang.String nuId;
|
||||
|
||||
/**参考单价*/
|
||||
private java.lang.String referenceUnitPrice;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
package com.nu.modules.qgd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper;
|
||||
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.configSuppliersInfo.service.IConfigSuppliersInfoService;
|
||||
import com.nu.modules.qgd.entity.QgdInfo;
|
||||
import com.nu.modules.qgd.entity.QgdMain;
|
||||
import com.nu.modules.qgd.mapper.QgdInfoMapper;
|
||||
|
|
@ -16,10 +24,8 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 请购单
|
||||
|
|
@ -33,6 +39,13 @@ public class QgdMainServiceImpl extends ServiceImpl<QgdMainMapper, QgdMain> impl
|
|||
@Autowired
|
||||
private QgdInfoMapper qgdInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private NuInvoicingCgdMainMapper cgdMainMapper;
|
||||
@Autowired
|
||||
private NuInvoicingCgdInfoMapper cgdInfoMapper;
|
||||
@Autowired
|
||||
private ConfigSuppliersInfoMapper gysMapper;
|
||||
|
||||
@Override
|
||||
public String addCgdByUser(QgdInfo nuInvoicingQgdInfo) {
|
||||
|
||||
|
|
@ -67,12 +80,53 @@ public class QgdMainServiceImpl extends ServiceImpl<QgdMainMapper, QgdMain> impl
|
|||
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);
|
||||
|
||||
|
||||
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ package com.nu.modules.nubaseinfo.entity;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.nu.entity.CameraInfoEntity;
|
||||
import com.nu.entity.CustomerDirectiveEntity;
|
||||
import com.nu.entity.CustomerInfoEntity;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -164,5 +161,7 @@ public class NuBaseInfo implements Serializable {
|
|||
//客户指令信息
|
||||
@TableField(exist = false)
|
||||
private List<CustomerDirectiveEntity> customerDirectiveDtoList;
|
||||
@TableField(exist = false)
|
||||
private List<ElderServerEntity> elderServerEntityList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.CameraInfoEntity;
|
||||
import com.nu.entity.CustomerInfoEntity;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.camerainfo.api.CameraInfoApi;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.nubaseinfo.entity.NuBaseInfo;
|
||||
|
|
@ -158,12 +155,10 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
BeanUtils.copyProperties(nuBizCustomerInfo, customerInfo);
|
||||
ni.setElderInfo(customerInfo);
|
||||
//根据客户id查询服务指令
|
||||
// List<NuCustomerDirective> customerDirectiveList = nuCustomerDirectiveService.list(new QueryWrapper<NuCustomerDirective>().lambda().eq(NuCustomerDirective::getCustomerId,customerInfo.getId()));
|
||||
// if(customerDirectiveList != null && customerDirectiveList.size() > 0){
|
||||
// List<CustomerDirectiveDto> customerDirectiveDtoList = new ArrayList<>();
|
||||
// BeanUtils.copyProperties(customerDirectiveList,customerDirectiveDtoList);
|
||||
// nuBaseInfoApiDto.setCustomerDirectiveDtoList(customerDirectiveDtoList);
|
||||
// }
|
||||
List<ElderServerEntity> customerDirectiveList = elderInfoApi.getElderServerList(customerInfo);
|
||||
if(customerDirectiveList != null && customerDirectiveList.size() > 0){
|
||||
ni.setElderServerEntityList(customerDirectiveList);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue