BUG修改

This commit is contained in:
haozq 2024-11-21 14:00:35 +08:00
parent b2bf6135d4
commit 01523714f7
13 changed files with 178 additions and 33 deletions

View File

@ -0,0 +1,45 @@
package com.bonus.gzgqj.business.aqgqj;
import lombok.Data;
/**
* 工器具类型
* @author 黑子
*/
@Data
public class MaTypeVo extends ParentVo {
private String id;
/**
* 父节点id
*/
private String parentId;
/**
* 名称
*/
private String name;
/**
* 库存数量
*/
private String storageNum;
/**
* 单位
*/
private String unitName;
private String isActive;
/**
* 备注
*/
private String remark;
private String level;
/**
* 周期
*/
private String cycle;
}

View File

@ -0,0 +1,36 @@
package com.bonus.gzgqj.business.aqgqj;
import lombok.Data;
/**
* @author 黑子
*/
@Data
public class ParentVo {
/**
* 创建人
*/
private String creator;
private String createTime;
/**
* 修改人
*/
private String updater;
private String updateTime;
/**
* 是否有效 0 正常 1无效
*/
private String isActive;
/**
* 状态
*/
private String status;
/**
* 关键字
*/
private String keyWord;
}

View File

@ -0,0 +1,34 @@
package com.bonus.gzgqj.business.aqgqj;
import lombok.Data;
/**
* 供应商 管理
* @author 黑子
*/
@Data
public class SupplierVo extends ParentVo{
private String id;
/**
* 名称
*/
private String name;
/**
* 编码
*/
private String code;
/**
* 联系人
*/
private String link;
/**
* 联系电话
*/
private String phone;
private String remark;
}

View File

@ -10,6 +10,7 @@ import com.bonus.gzgqj.business.bases.service.StatisticsServiceImpl;
import com.bonus.gzgqj.business.plan.entity.FileUploadVo;
import com.bonus.gzgqj.business.plan.entity.PlanApplyBeanPlanExport;
import com.bonus.gzgqj.manager.annotation.DecryptAndVerify;
import com.bonus.gzgqj.manager.common.util.StringHelper;
import com.bonus.gzgqj.manager.core.entity.EncryptedReq;
import com.bonus.gzgqj.manager.webResult.ServerResponse;
import com.github.pagehelper.PageHelper;
@ -122,6 +123,15 @@ public class StatisticsController {
list.forEach(vo->{
vo.setXh(num[0]);
num[0]++;
if(StringHelper.isEmpty(vo.getLyNum())){
vo.setLyNum("0");
}
if(StringHelper.isEmpty(vo.getLydNum())){
vo.setLydNum("0");
}
if(StringHelper.isEmpty(vo.getLyMoney())){
vo.setLyMoney("0");
}
});
ExportParams exportParams = new ExportParams("工程统计", "工程统计", ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, ProjectInfoVo.class, list);

View File

@ -45,6 +45,7 @@ public class ProjectInfoVo {
/**
* 维修单数量
*/
@Excel(name = "领用金额", width = 10.0, orderNum = "6")
private String lyMoney;

View File

@ -72,14 +72,14 @@ public class PartApplyServiceImpl implements PartApplyService{
String infoMsg = String.join(",", info);
vo.setInfoMsg(infoMsg);
//图片转换
// String bast641=transBast64(vo.getLyUrl());
// String bast642=transBast64(vo.getCkUrl());
// String bast643=transBast64(vo.getShUrl());
// String bast644=transBast64(vo.getZdUrl());
// vo.setLyUrl(bast641);
// vo.setCkUser(bast642);
// vo.setShUrl(bast643);
// vo.setZdUrl(bast644);
String bast641=transBast64(vo.getLyUrl());
String bast642=transBast64(vo.getCkUrl());
String bast643=transBast64(vo.getShUrl());
String bast644=transBast64(vo.getZdUrl());
vo.setLyUrl(bast641);
vo.setCkUrl(bast642);
vo.setShUrl(bast643);
vo.setZdUrl(bast644);
List<FileUploadVo> flieList=uploadService.getFileList(data.getId(),"t_part_apply",null);
vo.setFileList(flieList);
return ServerResponse.createSuccess(vo);
@ -211,7 +211,7 @@ public class PartApplyServiceImpl implements PartApplyService{
}
public String transBast64(String url){
public static String transBast64(String url){
try{
if(StringHelper.isEmpty(url)){
return "";
@ -224,8 +224,10 @@ public class PartApplyServiceImpl implements PartApplyService{
}
return "";
}
public static void main(String[] args) {
System.err.println(transBast64("D:\\files\\zg_gqj\\20241109\\173113057456537938315.jpg"));
}
}

View File

@ -80,6 +80,8 @@ public class ProNeedInfo extends PageInfo {
*/
private String needType;
private String code;
/**

View File

@ -175,6 +175,7 @@ public class PlanAuditServiceImpl implements PlanAuditService {
}
}
}catch (Exception e) {
log.error(e.toString(),e);
throw new RuntimeException("审核失败");
}
@ -187,7 +188,7 @@ public class PlanAuditServiceImpl implements PlanAuditService {
*/
public void aduitError(AuditBean vo,String statusType,SelfUserEntity user) {
//修改审核状态
vo.setAuditStatus(statusType);//审核节点
vo.setAuditType(statusType);//审核节点
dao.updatePlanAudit(vo);
vo.setAuditor(Integer.parseInt(user.getUserId()+""));
vo.setUpdater(Integer.parseInt(user.getUserId()+""));

View File

@ -56,7 +56,10 @@ public class SecurityUtils {
// 从header获取token标识/请求参数中获取
String token = request.getHeader(TokenConstants.AUTHENTICATION);
if(StringUtils.isBlank(token)){
token = request.getParameter(TokenConstants.AUTHENTICATION_PARAM);
token = request.getParameter(TokenConstants.AUTHENTICATION_PARAM1);
if(StringUtils.isBlank(token)){
token = request.getParameter(TokenConstants.AUTHENTICATION_PARAM);
}
}
return replaceTokenPrefix(token);
}

View File

@ -11,7 +11,7 @@ public class TokenConstants
* 令牌自定义标识
*/
public static final String AUTHENTICATION = "Authorization";
public static final String AUTHENTICATION_PARAM1= "auth";
public static final String AUTHENTICATION_PARAM = "token";
/**

View File

@ -7,7 +7,7 @@
FROM pa_type
where pa_type.`level`=1 AND is_active=1
UNION ALL
select IFNULL( count(1),0)
select IFNULL( SUM(num),0)
FROM pa_type
where pa_type.`level`=3 AND is_active=1
UNION ALL

View File

@ -47,7 +47,8 @@
</select>
<!--查询工程 计划-出库 信息-->
<select id="getProPlanInfo" parameterType="java.lang.String" resultType="com.bonus.gzgqj.business.plan.entity.ProPlanInfoBean" >
select pro_id proId,need_num needNum,plan_num planNum,record_num recordNum,out_num outNum,status
select pro_id proId,need_num needNum,plan_num planNum,record_num recordNum,out_num outNum,status,
record2_num recordNum2,out2_num outNum2
from t_pro_plan_info
where pro_id=#{proId}
</select>
@ -108,10 +109,9 @@
<!-- 更新工程数据库存量-->
<insert id="insertProPlanInfo" parameterType="com.bonus.gzgqj.business.plan.entity.ProPlanInfoBean">
insert into t_pro_plan_info
(pro_id,need_num,plan_num,record_num,out_num,status,last_day,tz_num) values
(#{proId},#{needNum},#{planNum},#{recordNum},#{outNum},#{status},#{lastDay},#{tzNum} ,out2_num=#{outNum2},record2_num=#{recordNum2} )
(pro_id,need_num,plan_num,record_num,out_num,status,last_day,tz_num,out2_num,record2_num) values
(#{proId},#{needNum},#{planNum},#{recordNum},#{outNum},#{status},#{lastDay},#{tzNum} ,#{outNum2},#{recordNum2} )
</insert>
<!-- 更新工程所需量 -->
<update id="updateProPlanInfo" parameterType="com.bonus.gzgqj.business.plan.entity.ProPlanInfoBean" >
update t_pro_plan_info set need_num=#{needNum},plan_num=#{planNum},status=#{status} where pro_id=#{proId}

View File

@ -130,16 +130,16 @@
</select>
<!--超出 数量-->
<select id="getOverNum" resultType="com.bonus.gzgqj.business.plan.entity.StatisticsVo">
SELECT IFNULL(SUM(pni.need_num-mt.NUM),0) num
SELECT SUM(ABS(pni.need_num-mt.NUM)) num
from t_pro_need_info pni
left join mm_type mt on pni.module_id=mt.id
where pni.need_type=1
left join mm_type mt on pni.module_id=mt.id
where pni.need_type=1 and (pni.need_num)>mt.NUM
</select>
<select id="getOutTimes" resultType="com.bonus.gzgqj.business.plan.entity.OutDetailInfoVo">
select id, create_day createDay,create_time
from t_plan_out
where pro_id=#{proId}
order by create_time desc
order by create_time ASC
</select>
<select id="getOutDetails" resultType="com.bonus.gzgqj.business.plan.entity.OutDetailInfoVo">
@ -173,7 +173,7 @@
from t_plan_out_detail pod
left join t_pro_need_info pni on pni.module_id=pod.module_id
<where>
pod.out_id=#{id}
pod.out_id=#{id} and pni.pro_id=#{proId}
<if test="module!=null and module!=''">
and pod.`module` like concat('%',#{module},'%')
</if>
@ -191,7 +191,7 @@
<where>
pni.need_type=1 and (pni.need_num-pni.fh_num-pni.tz_num)>0
<if test="proId!=null and proId!=''">
and pni.`pro_id` like concat('%',#{proId},'%')
and pni.`pro_id` =#{proId}
</if>
<if test="module!=null and module!=''">
and pni.`module` like concat('%',#{module},'%')
@ -239,8 +239,8 @@
order by plan.update_time DESC
</select>
<select id="getDataInfoByPage" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
select pni.id,pni.type,pni.name,pni.module,pni.module_id moduleId,pni.need_num needNum,pni.fh_num fhNum,pni.tz_num tzNum,
IF(pni.need_num-pni.fh_num-pni.tz_num >0,pni.need_num-pni.fh_num-pni.tz_num,0) diff,
select pni.type,pni.name,pni.module,pni.module_id moduleId, SUM(pni.need_num) needNum, SUM(pni.fh_num+pni.tz_num) fhNum,pni.tz_num tzNum,
SUM( IF(pni.need_num-pni.fh_num-pni.tz_num >0,pni.need_num-pni.fh_num-pni.tz_num,0)) diff,
pro.num proNum,IFNULL(plan.num,0) planNum,pni.unit,pro2.name proName
from t_pro_need_info pni
LEFT JOIN(
@ -250,10 +250,13 @@
)pro on pro.module_id=pni.module_id
LEFT JOIN (
select model_id ,count(apply_id) num
FROM t_plan_details
FROM t_plan_details td
LEFT JOIN t_plan_apply tp on tp.id=td.apply_id
where tp.`status_type`=1
GROUP BY model_id
)plan on plan.model_id=pni.module_id
LEFT JOIN bm_project pro2 on pni.pro_id=pro2.id
<where>
<if test='typeSource=="1"'>
and pni.fh_num=0
@ -268,7 +271,7 @@
and pni.`name` like concat('%',#{name},'%')
</if>
</where>
GROUP BY pni.type,pni.name,pni.module,pni.module_id
</select>
<select id="getDataPlanByPage" resultType="com.bonus.gzgqj.business.plan.entity.PlanApplyBean">
SELECT
@ -289,15 +292,20 @@
left join bm_project pro on plan.project_id=pro.ID
left join t_plan_details tdd on plan.id=tdd.apply_id
where tdd.model_id=#{moduleId} and plan.status_type=1
<if test="proName !=null and proName !=''">
and pro.name like concat('%',#{proName},'%')
</if>
<if test="code !=null and code !=''">
and plan.CODE like concat('%',#{code},'%')
</if>
</select>
<!--查询模型-->
<select id="getDataInfoDetails" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
select pni.id,pni.type,pni.name,pni.module,pni.module_id moduleId,pni.need_num needNum,pni.fh_num fhNum,pni.tz_num tzNum,
pro.num proNum,plan.num planNum,pni.unit,if(pni.need_num-pni.fh_num-pni.tz_num>0,pni.need_num-pni.fh_num-pni.tz_num,0) wfhNum,
mt.num kuNum ,ABS(pni.need_num-pni.fh_num-pni.tz_num-mt.num) clNum
select pni.type,pni.name,pni.module,pni.module_id moduleId,SUM(pni.need_num) needNum,SUM(pni.fh_num) fhNum,SUM(pni.tz_num) tzNum,
pro.num proNum,plan.num planNum,pni.unit,SUM(if(pni.need_num-pni.fh_num-pni.tz_num>0,pni.need_num-pni.fh_num-pni.tz_num,0)) wfhNum,
mt.num kuNum ,SUM(if(pni.need_num-pni.fh_num-pni.tz_num>0,pni.need_num-pni.fh_num-pni.tz_num,0)) clNum
from t_pro_need_info pni
left join mm_type mt on mt.id=pni.module_id and mt.`LEVEL`=4
LEFT JOIN(
@ -307,10 +315,13 @@
)pro on pro.module_id=pni.module_id
LEFT JOIN (
select model_id ,count(apply_id) num
FROM t_plan_details
FROM t_plan_details td
LEFT JOIN t_plan_apply tp on tp.id=td.apply_id
where tp.`status_type`=1
GROUP BY model_id
)plan on plan.model_id=pni.module_id
where pni.module_id=#{moduleId}
GROUP BY pni.type,pni.name,pni.module,pni.module_id ;
</select>
<select id="getWarnInfoPage" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
select tni.pro_id proId,tni.type,tni.`name`,tni.module,tni.module_id moduleId ,tni.unit,tni.need_num needNum,tni.id ,mt.num,