This commit is contained in:
mashuai 2024-09-06 10:34:28 +08:00
parent 9e0b96e482
commit 11eca5c209
18 changed files with 66 additions and 51 deletions

View File

@ -232,7 +232,9 @@ public class MaMachine extends BaseEntity {
/**
* 领料时间
*/
private String leaseTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date leaseTime;
/**
* 退料单位
*/
@ -244,7 +246,9 @@ public class MaMachine extends BaseEntity {
/**
* 退料时间
*/
private String backTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date backTime;
@ApiModelProperty(value = "1二维码绑定标识 2rfid绑定标识")
private Integer flag;

View File

@ -159,12 +159,12 @@ public class MaMachineServiceImpl implements MaMachineService {
if (leaseProject != null){
ma.setLeaseUnit(leaseProject.getUnitName());
ma.setLeasePro(leaseProject.getProjectName());
ma.setLeaseTime(String.valueOf(leaseProject.getCreateTime()));
ma.setLeaseTime(leaseProject.getCreateTime());
}
if (backProject != null){
ma.setBackUnit(backProject.getUnitName());
ma.setBackPro(backProject.getProjectName());
ma.setBackTime(String.valueOf(backProject.getCreateTime()));
ma.setBackTime(backProject.getCreateTime());
}
}else {
throw new ServiceException("二维码对应机具信息无效");

View File

@ -1,6 +1,8 @@
package com.bonus.sgzb.material.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@ -29,11 +31,15 @@ public class ProjectMonthDetail {
/**
* 开始日期
*/
private String startTime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startTime;
/**
* 结束日期
*/
private String endTime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endTime;
/**
* 结算天数
*/

View File

@ -154,8 +154,8 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
projectMonthDetail.setMaId(Integer.valueOf(bean.getMaId()));
}
projectMonthDetail.setUnit(bean.getNuitName());
projectMonthDetail.setStartTime(String.valueOf(bean.getStartTime()));
projectMonthDetail.setEndTime(String.valueOf(bean.getEndTime()));
projectMonthDetail.setStartTime(bean.getStartTime());
projectMonthDetail.setEndTime(bean.getEndTime());
projectMonthDetail.setSltDays(bean.getLeaseDays());
projectMonthDetail.setNum(bean.getNum());
projectMonthDetail.setLeasePrice(bean.getLeasePrice());

View File

@ -135,6 +135,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
//修改装备状态
for (ScrapApplyDetails scrapApplyDetails: scrapApplyDetailList){
scrapApplyDetails.setAuditTime(new Date());
scrapApplyDetails.setUpdateTime(DateUtils.getNowDate());
scrapApplyDetailsMapper.updateScrapApplyDetails(scrapApplyDetails);
}
//根据任务id查看是否还有未审核的设备

View File

@ -542,8 +542,8 @@
)
</insert>
<insert id="insStlInfoTwo">
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type)
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},#{info.leaseType});
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type,create_time)
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},#{info.leaseType},now());
</insert>
@ -568,6 +568,7 @@
<update id="updateStlInfo">
update slt_agreement_info
set end_time = now(),
update_time = now(),
back_id = #{record.parentId},
status = '1'
where id = #{info.id}
@ -576,13 +577,14 @@
update slt_agreement_info
set num = #{backNum},
end_time = now(),
update_time = now(),
back_id = #{record.parentId},
status = '1'
where id = #{info.id}
</update>
<update id="finishBackCheckDetails">
update back_check_details set is_finished = 1 where parent_id = #{parentId} and type_id = #{typeId} and (is_finished is null or is_finished != 1)
update back_check_details set is_finished = 1, update_time = now() where parent_id = #{parentId} and type_id = #{typeId} and (is_finished is null or is_finished != 1)
</update>
<delete id="deleteCheckDetails">

View File

@ -71,7 +71,7 @@
values (#{code,jdbcType=VARCHAR}, #{taskId,jdbcType=INTEGER}, #{leasePerson,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{companyAuditBy,jdbcType=INTEGER}, #{companyAuditTime,jdbcType=VARCHAR},
#{companyAuditRemark,jdbcType=VARCHAR}, #{deptAuditBy,jdbcType=INTEGER}, #{deptAuditTime,jdbcType=VARCHAR},
#{deptAuditRemark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{deptAuditRemark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, NOW(),
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{companyId,jdbcType=INTEGER}, #{estimateLeaseTime,jdbcType=TIMESTAMP},#{leaseType,jdbcType=VARCHAR},#{costBearingParty,jdbcType=VARCHAR})
</insert>
@ -116,9 +116,7 @@
<if test="createBy != null and createBy != ''">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
create_time,
<if test="updateBy != null and updateBy != ''">
update_by,
</if>
@ -178,9 +176,7 @@
<if test="createBy != null and createBy != ''">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
NOW(),
<if test="updateBy != null and updateBy != ''">
#{updateBy,jdbcType=VARCHAR},
</if>
@ -248,15 +244,13 @@
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null and remark != ''">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
update_time = NOW(),
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@ -277,7 +271,7 @@
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_time = NOW(),
remark = #{remark,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
@ -509,7 +503,7 @@
#{item.type,jdbcType=VARCHAR}, #{item.companyAuditBy,jdbcType=INTEGER}, #{item.companyAuditTime,jdbcType=VARCHAR},
#{item.companyAuditRemark,jdbcType=VARCHAR}, #{item.deptAuditBy,jdbcType=INTEGER},
#{item.deptAuditTime,jdbcType=VARCHAR}, #{item.deptAuditRemark,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.remark,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER}
)
</foreach>

View File

@ -310,7 +310,8 @@
</update>
<update id="updSltInfo">
update slt_agreement_info
set num = #{num}
set num = #{num},
update_time = now()
where id = #{id}
</update>
<update id="updateMaTypeStockNumCt">
@ -384,8 +385,8 @@
</trim>
</insert>
<insert id="insSltInfo">
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type)
values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},now(),0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},'0',#{record.companyId},#{record.leaseType});
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type,create_time)
values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},now(),0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},'0',#{record.companyId},#{record.leaseType},now());
</insert>
<select id="leaseOutRecordList" resultType="com.bonus.sgzb.base.api.domain.LeaseOutDetails">

View File

@ -113,7 +113,7 @@
<if test="userId != null and userId != 0">user_id,</if>
<if test="status != null and status != 0">status,</if>
<if test="companyId != null and companyId != ''">company_id,</if>
time
create_time
)values(
<if test="typeId != null and typeId != 0">#{typeId},</if>
<if test="maId != null and maId != ''">#{maId},</if>
@ -301,11 +301,11 @@
</select>
<update id="updateKeeperByTypeId">
update ma_type_keeper set user_id = #{userId} where type_id = #{typeId}
update ma_type_keeper set user_id = #{userId},update_time = now() where type_id = #{typeId}
</update>
<update id="updateRepairByTypeId">
update ma_type_repair set user_id = #{userId} where type_id = #{typeId}
update ma_type_repair set user_id = #{userId},update_time = now() where type_id = #{typeId}
</update>
<update id="updatePropSetByTypeId">

View File

@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="time != null">time = #{time},</if>
update_time = now(),
<if test="status != null">status = #{status},</if>
<if test="companyId != null">company_id = #{companyId},</if>
</trim>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.sgzb.base.mapper.WarehouseKeeperMapper">
<insert id="add">
insert into ma_type_keeper(type_id, user_id,company_id,time) values
insert into ma_type_keeper(type_id, user_id,company_id,create_time) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.typeIds},#{item.userId},#{item.companyId},NOW())
</foreach>

View File

@ -302,7 +302,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="setModify">
update back_apply_details
set pre_num =#{num}
set pre_num =#{num},
update_time = NOW()
where id = #{detailsId}
</update>

View File

@ -69,8 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<insert id="insStlInfoTwo">
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id)
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId});
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,create_time)
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},now());
</insert>
<update id="updateMaStatus">
update ma_machine
@ -81,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateStlInfo">
update slt_agreement_info
set end_time = now(),
update_time = now(),
back_id = #{record.parentId},
status = '1'
where id = #{info.id}
@ -89,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update slt_agreement_info
set num = #{backNum},
end_time = now(),
update_time = now(),
back_id = #{record.parentId},
status = '1'
where id = #{info.id}

View File

@ -8,17 +8,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INSERT INTO slt_project_month (month,create_time) VALUES (#{month},now())
</insert>
<insert id="insertProMonCosts" useGeneratedKeys="true" keyProperty="id">
insert into project_month_costs(agreement_id,task_id,unit_id,project_id,month,cost_bearing_party)
insert into project_month_costs(agreement_id,task_id,unit_id,project_id,month,cost_bearing_party,create_time)
values
(#{agreementId},#{taskId},#{unitId},#{projectId},#{month},#{costBearingParty})
(#{agreementId},#{taskId},#{unitId},#{projectId},#{month},#{costBearingParty},now())
</insert>
<insert id="insertProjectMonthDetail">
insert into project_month_detail (type_id,ma_id,unit,start_time,end_time,slt_days,slt_costs,month_temporarily_costs,pro_month_cost_id,num,lease_price)
insert into project_month_detail (type_id,ma_id,unit,start_time,end_time,slt_days,slt_costs,month_temporarily_costs,pro_month_cost_id,num,lease_price,create_time)
values
(#{typeId},#{maId},#{unit},#{startTime},#{endTime},#{sltDays},#{sltCosts},#{monthTemporarilyCosts},#{proMonthCostId},#{num},#{leasePrice})
(#{typeId},#{maId},#{unit},#{startTime},#{endTime},#{sltDays},#{sltCosts},#{monthTemporarilyCosts},#{proMonthCostId},#{num},#{leasePrice},now())
</insert>
<update id="updateProMonCosts">
update project_month_costs set costs = #{costs} where id = #{id}
update project_month_costs set costs = #{costs},update_time = now() where id = #{id}
</update>
<select id="getCalcRecords" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean" resultType="com.bonus.sgzb.material.domain.CalMonthlyBean">

View File

@ -4,12 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.sgzb.material.mapper.LeaseRecordMapper">
<insert id="insSltInfo">
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id)
values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},now(),0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},'0',#{record.companyId});
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,create_time)
values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},now(),0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},'0',#{record.companyId},now());
</insert>
<update id="updSltInfo">
update slt_agreement_info
set num = #{num}
set num = #{num},
update_time = now()
where id = #{id}
</update>

View File

@ -224,7 +224,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where repair_id = #{inputDetails.repairId}
</update>
<update id="updateRecodeStatus">
update repair_apply_record set status = 1 where id = #{id}
update repair_apply_record set status = 1,update_time = now() where id = #{id}
</update>
<delete id="deleteRepairAuditDetailsById" parameterType="Long">

View File

@ -31,8 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
values (#{code},#{creator},now(),'0',#{companyId},#{cost});
</insert>
<insert id="insRelation">
insert into slt_agreement_relation (apply_id,agreement_id,add_cost,sub_cost,remark,cost,status,lease_one_cost,lease_three_cost,repair_cost,scrap_cost,lose_cost)
values (#{applyId},#{agreementId},#{addCost},#{subCost},#{remark},#{cost},'0',#{leaseCostOne},#{leaseCostThree},#{repairCost},#{scrapCost},#{loseCost});
insert into slt_agreement_relation (apply_id,agreement_id,add_cost,sub_cost,remark,cost,status,lease_one_cost,lease_three_cost,repair_cost,scrap_cost,lose_cost,create_time)
values (#{applyId},#{agreementId},#{addCost},#{subCost},#{remark},#{cost},'0',#{leaseCostOne},#{leaseCostThree},#{repairCost},#{scrapCost},#{loseCost},now());
</insert>
<insert id="insDetails">
insert into slt_agreement_details
@ -64,12 +64,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateInfoStatus">
update slt_agreement_info
set is_slt = '1',
slt_time = now()
slt_time = now(),
update_time = now(),
where agreement_id = #{agreementId}
</update>
<update id="updateRelation">
update slt_agreement_relation
set status = #{status}
set status = #{status},
update_time = now()
where agreement_id = #{agreementId}
</update>
<update id="updateApply">
@ -77,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set status = #{status},
auditor = #{auditor},
audit_time = now(),
update_time = now(),
remark = #{remark}
where id = #{id}
</update>
@ -114,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update bm_agreement_info set is_slt = 1 where agreement_id = #{agreementId}
</update>
<update id="updateRecodeIsSlt">
update repair_apply_record set is_slt = 1 where id = #{id}
update repair_apply_record set is_slt = 1,update_time = now() where id = #{id}
</update>
<select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,

View File

@ -90,8 +90,8 @@
)
</insert>
<insert id="saveDirectApplyDetails" parameterType="com.bonus.sgzb.base.api.domain.DirectApplyDetails">
insert into direct_apply_details(direct_id,type_id,ma_id,direct_num)
values (#{directId},#{typeId},#{maId}, #{directNum})
insert into direct_apply_details(direct_id,type_id,ma_id,direct_num,create_time)
values (#{directId},#{typeId},#{maId}, #{directNum},NOW())
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.material.domain.LeaseApplyInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
@ -323,7 +323,7 @@
)
</insert>
<update id="refuseDirectApplyInfo">
update direct_apply_info set status = #{status},auditor=#{auditor},audit_time=#{auditTime} where id = #{id}
update direct_apply_info set status = #{status},auditor=#{auditor},audit_time=#{auditTime},update_time = now() where id = #{id}
</update>
<update id="updateLeaseApplyDetailsOutNum">
UPDATE