1. 需求计划明细增加需用量和车辆规格字段

2. 用户信息增加昵称字段
3. 新增分公司级人员父节点查询方法
4. 紧急用车附件上传逻辑优化
5. 数据库表car_plan_details增加car_spec字段
6. 供应商用户绑定功能优化
7. 新增测试环境、生产环境配置文件
This commit is contained in:
syruan 2025-06-29 18:21:03 +08:00
parent 8d62c554c4
commit ba57256fec
12 changed files with 212 additions and 76 deletions

View File

@ -47,12 +47,18 @@ public class CarNeedPlanDetailVo {
private String unit;
private String modelId;
/**
* 需用量
*/
@Excel(name = "需用量", width = 10.0, orderNum = "5")
private int needNum;
/**
* 需求计划申请--所需的车辆规格
*/
private String carSpec;
private String needDay;
/**

View File

@ -31,7 +31,9 @@ public class CarUserVo extends ParentVo {
private String userId;
private String userName;
private String userName;
private String nikeName;
}

View File

@ -35,12 +35,19 @@ public interface CarSupMapper {
int updateCarSupData(CarSupVo data);
/**
* 查询人员父节点
* 查询人员父节点--公司级
* @param data
* @return
*/
List<CarUserVo> gteUserParentList(CarUserVo data);
/**
* 查询人员父节点--分公司级
* @param data
* @return
*/
List<CarUserVo> gteUserParentListByOrg(CarUserVo data);
/**
* 查询人员集合
* @param data

View File

@ -111,7 +111,7 @@ public class CarNeedPlanServiceImpl implements CarNeedPlanService{
return ServerResponse.createErroe("计划编号已存在");
}
if(files==null || files.length<1){
return ServerResponse.createErroe("请上传附件");
System.out.println("未上传计划附件");
}
}else{
@ -127,9 +127,11 @@ public class CarNeedPlanServiceImpl implements CarNeedPlanService{
int num =mapper.addNeedPlanData(vo);
//紧急的上传附件
if("1".equals(vo.getApplyType())){
List<FileUploadVo> fileList=uploadService.uploadImage(files,vo.getId(),"car_plan_apply","紧急用车附件");
if(fileList.size()!=files.length){
return ServerResponse.createErroe("附件上传失败");
if (files != null && files.length > 0) {
List<FileUploadVo> fileList=uploadService.uploadImage(files,vo.getId(),"car_plan_apply","紧急用车附件");
if(fileList.size()!=files.length){
return ServerResponse.createErroe("附件上传失败");
}
}
recordService.addRecord(vo.getId(),"0","1","2","紧急内部用车","0");
}else{

View File

@ -131,7 +131,8 @@ public class CarSupServiceImpl implements CarSupService{
Map<String,Object> map= Maps.newHashMap();
try{
List<CarUserVo> list=mapper.gteUserParentList(data);
// List<CarUserVo> list=mapper.gteUserParentList(data);
List<CarUserVo> list=mapper.gteUserParentListByOrg(data);
List<CarUserVo> userList=mapper.getUserTreeList(data);
List<CarUserVo> checkList=mapper.getUserCheckList(data);
list.forEach(vo->{

View File

@ -0,0 +1,55 @@
# 配置端口
server:
port: 21522
servlet:
context-path:
# context-path: /gz_car
max-http-header-size: 10240
spring:
# 配置数据源
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://10.1.0.141:13306/gzimt1.0?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
# username: root
# password: gsyfq@09mysql!
url: jdbc:mysql://127.0.0.1:3306/gzimt250319?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: ruanliang
password: ruanliang@MYSQL
# type: com.alibaba.druid.pool.DruidDataSource
redis:
host: localhost
port: 6379
password:
# host: 10.1.0.141
# port: 6379
# password: Bonus@admin123!
database: 7
# database: 3
servlet:
multipart:
max-file-size: -1
max-request-size: -1
#mapper配置
mybatis:
mapper-locations: classpath:mappers/**/*Mapper.xml,mappers/**/**/*Mapper.xml
#日志配置
logging:
config: classpath:logback-boot.xml
log:
level:
root: info
my: debug
file: logs/sys-back.log
maxsize: 30MB
#是否开启安全模式
zhly:
aq:
enable: false
file:
upload_path:
windows: D://files/gz_car
linux: /home/zg_gqj/files

View File

@ -0,0 +1,47 @@
# 配置端口
server:
port: 21522
servlet:
context-path:
max-http-header-size: 10240
spring:
# 配置数据源
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.1.0.141:13306/gzimt1.0?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
username: root
password: gsyfq@09mysql!
# type: com.alibaba.druid.pool.DruidDataSource
redis:
host: 10.1.0.141
port: 6379
password: Bonus@admin123!
database: 7
servlet:
multipart:
max-file-size: -1
max-request-size: -1
#mapper配置
mybatis:
mapper-locations: classpath:mappers/**/*Mapper.xml,mappers/**/**/*Mapper.xml
#日志配置
logging:
config: classpath:logback-boot.xml
log:
level:
root: info
my: debug
file: logs/sys-back.log
maxsize: 30MB
#是否开启安全模式
zhly:
aq:
enable: false
file:
upload_path:
windows: D://files/gz_car
linux: /home/zg_gqj/files

View File

@ -0,0 +1,50 @@
# 配置端口
server:
port: 21522
servlet:
context-path: /gz-car
max-http-header-size: 10240
spring:
# 配置数据源
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.0.16:4419/gzimtcs?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
username: root
password: Bonus@admin123!
# url: jdbc:mysql://127.0.0.1:3306/gzimtcs?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
# username: mroot
# password: bonus@admin123
# type: com.alibaba.druid.pool.DruidDataSource
redis:
host: 192.168.0.16
port: 2001
password: Zhzbns@Redis123!
database: 1
servlet:
multipart:
max-file-size: -1
max-request-size: -1
#mapper配置
mybatis:
mapper-locations: classpath:mappers/**/*Mapper.xml,mappers/**/**/*Mapper.xml
#日志配置
logging:
config: classpath:logback-boot.xml
log:
level:
root: info
my: debug
file: logs/sys-back.log
maxsize: 30MB
#是否开启安全模式
zhly:
aq:
enable: false
file:
upload_path:
windows: D://files/gz_car
linux: /home/zg_gqj/files

View File

@ -1,54 +1,3 @@
# 配置端口
server:
port: 21522
servlet:
context-path: /gz-car
max-http-header-size: 10240
spring:
# 配置数据源
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.0.16:4419/gzimtcs?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
username: root
password: Bonus@admin123!
# url: jdbc:mysql://localhost:13306/gzimt250319?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
# username: root
# password: liang971108@Sun
# type: com.alibaba.druid.pool.DruidDataSource
redis:
host: 192.168.0.16
port: 2001
password: Zhzbns@Redis123!
database: 1
# host: 127.0.0.1
# port: 6379
# password: liang971108lu@L
# database: 7
servlet:
multipart:
max-file-size: -1
max-request-size: -1
#mapper配置
mybatis:
mapper-locations: classpath:mappers/**/*Mapper.xml,mappers/**/**/*Mapper.xml
#日志配置
logging:
config: classpath:logback-boot.xml
log:
level:
root: info
my: debug
file: logs/sys-back.log
maxsize: 30MB
#是否开启安全模式
zhly:
aq:
enable: false
file:
upload_path:
windows: e://files/gz_car
linux: /home/zg_gqj/files
profiles:
active: test

View File

@ -12,8 +12,8 @@
update car_driver_info set is_active=0 where id=#{id}
</update>
<update id="updateDriver">
update car_driver_info set name=#{name}, phone=#{phone},sup_id=#{supId},updator=#{updater},is_white=#{isWhiteList}
update_time=now()
update car_driver_info set name=#{name}, phone=#{phone},sup_id=#{supId},updator=#{updater},
is_white=#{isWhiteList},update_time=now()
where id=#{id}
</update>

View File

@ -16,10 +16,10 @@
</insert>
<insert id="addNeedPlanDetails">
insert into car_plan_details(
apply_id, model_id, need_num, need_day, remark,plan_type, back_date
apply_id, model_id, need_num, need_day, remark,plan_type, back_date, car_spec
)values
<foreach collection="list" item="item" separator=",">
(#{param.id},#{item.modelId},#{item.needNum},#{item.needDay},#{item.remark},#{param.type},#{item.backDate})
(#{param.id},#{item.modelId},#{item.needNum},#{item.needDay},#{item.remark},#{param.type},#{item.backDate},#{item.carSpec})
</foreach>
</insert>
@ -108,8 +108,8 @@
where cpa.id=#{id}
</select>
<select id="getNeedDetailInfo" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanDetailVo">
select cpd.id, cpd.apply_id planId ,cpd.model_id modelId,cpd.need_day needDay,cpd.need_num needNum,cpd.back_date backDate,
remark,plan_type planType,cmti.type,cmti.name,cmti.model ,cmti.unit
select cpd.id, cpd.apply_id planId, cpd.model_id modelId, cpd.need_day needDay, cpd.need_num needNum,
cpd.back_date backDate, cpd.car_spec carSpec, remark,plan_type planType, cmti.type, cmti.name, cmti.model, cmti.unit
from car_plan_details cpd
LEFT JOIN car_ma_type_info cmti on cpd.model_id=cmti.id
where apply_id=#{id}

View File

@ -7,6 +7,7 @@
name,code, link, phone,is_active, creator, create_time, updater, update_time, remark
) values (#{name},#{code},#{link},#{phone},#{isActive},#{creator},now(),#{updater},now(),#{remark})
</insert>
<insert id="addUserBind">
insert into car_supplier_user( sup_id,user_id, creator, create_time, updater, update_time)
values
@ -14,20 +15,25 @@
(#{supId},#{item},#{user.creator},now(),#{user.creator},now() )
</foreach>
</insert>
<update id="updateCarSupData">
update car_supplier set name=#{name},code=#{code},updater=#{updater},update_time=now(),
link=#{link},phone=#{phone},is_active=#{isActive}
where id=#{id}
<update id="updateCarSupData">
update car_supplier set name=#{name},code=#{code},updater=#{updater},update_time=now(),
link=#{link},phone=#{phone},is_active=#{isActive}
where id=#{id}
</update>
<update id="updateSupUser">
update car_supplier set user_names=#{userName},user_ids=#{userId} where id=#{supId}
</update>
<delete id="deleteCarSup">
delete from car_supplier where id=#{id}
</delete>
<delete id="deleteUserBind">
delete from car_supplier_user where sup_id=#{supId}
</delete>
<select id="getCarSupPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarSupVo">
select id, name ,code, link, phone, is_active isActive,
creator, create_time createTime, remark,user_names userNames
@ -39,6 +45,7 @@
</where>
order by create_time desc
</select>
<select id="getCarSupByName" resultType="java.lang.Integer">
select count(1)
from car_supplier
@ -46,21 +53,23 @@
<if test="id!=null and id!=''">
and id!=#{id}
</if>
</select>
<select id="getCarSupDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarSupVo">
select id, name ,code, link, phone, is_active isActive,
creator, create_time createTime, remark
from car_supplier
where id=#{id}
</select>
<select id="gteUserParentList" resultType="com.bonus.gzcar.business.backstage.entity.CarUserVo">
select concat('org-',bcy.id) id ,bcy.name title,0 parentId
from bm_company bcy
where bcy.IS_ACTIVE=1
</select>
<select id="getUserTreeList" resultType="com.bonus.gzcar.business.backstage.entity.CarUserVo">
select pu.id,pu.`LOGIN_NAME` title,concat('org-', pu.COMPANY_ID) parentId
select pu.id,pu.`LOGIN_NAME` title,pu.`NAME` as nikeName,concat('org-', pu.COMPANY_ID) parentId
from pm_user pu
left join car_supplier_user csu on pu.id=csu.user_id and csu.sup_id!=#{supId}
where pu.IS_ACTIVE=1 and csu.id is null
@ -68,17 +77,20 @@
and pu.`LOGIN_NAME` like concat('%',#{title},'%')
</if>
</select>
<select id="getSupSelected" resultType="com.bonus.gzcar.business.backstage.entity.CarSupVo">
select id, name
from car_supplier
where is_active =1
</select>
<select id="getUserCheckList" resultType="com.bonus.gzcar.business.backstage.entity.CarUserVo">
select pu.id,pu.`LOGIN_NAME` title,concat('org-', pu.COMPANY_ID) parentId
select pu.id,pu.`LOGIN_NAME` title,pu.`NAME` as nikeName,concat('org-', pu.COMPANY_ID) parentId
from car_supplier_user csu
left join pm_user pu on csu.user_id=.pu.id
where pu.IS_ACTIVE=1 and csu.sup_id=#{supId}
</select>
<!--查询 供应商 商查询-->
<select id="getContractSupList" resultType="com.bonus.gzcar.business.backstage.entity.CarSupVo">
select distinct ccr.contract_id contractId,ccr.sup_id id,ccr.type,cs.`name` name
@ -90,9 +102,14 @@
and ccr.type=#{type}
</if>
</select>
<select id="getUserBySup" resultType="java.lang.Integer">
select count(1)
from car_supplier_info
where is_active=1 and sup_id=#{id}
select count(1) from car_supplier_info where is_active=1 and sup_id = #{id}
</select>
<select id="gteUserParentListByOrg" resultType="com.bonus.gzcar.business.backstage.entity.CarUserVo">
select concat('org-',bcy.id) id ,bcy.name title,0 parentId
from pm_organization bcy
where bcy.IS_ACTIVE=1
</select>
</mapper>