Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eec736892c
|
|
@ -548,8 +548,4 @@ public class GlobalConstants {
|
|||
*/
|
||||
public static final Long LONG_65535 = 65535L;
|
||||
|
||||
public static final int NUM_9 = 9;
|
||||
public static final int NUM_100 = 100;
|
||||
public static final int NUM_99 = 99;
|
||||
public static final int NUM_1000 = 1000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,4 +49,7 @@ public class MaterialConstants {
|
|||
*/
|
||||
public static final Integer TEN_CONSTANT = 10;
|
||||
|
||||
/** 协议号的开头字母 */
|
||||
public static final String AGREEMENT_PREFIX = "H";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public enum PurchaseTaskStatusEnum {
|
|||
TO_BIND_AFTER_REJECT(13, "待绑定(驳回后)"),
|
||||
TO_STORE_AFTER_REJECT(14, "待入库(驳回后)"),
|
||||
IN_STORE(19, "已入库"),
|
||||
TASK_NOT_START(20, "入库未开始"),
|
||||
TASK_TO_START(20, "入库待开始"),
|
||||
TASK_IN_PROGRESS(21, "入库进行中"),
|
||||
TASK_FINISHED(22, "入库已完成");
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@ public class BmAgreementInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "工程标段ID")
|
||||
private Long projectId;
|
||||
|
||||
/** 工程标段名称 */
|
||||
@Excel(name = "工程标段名称")
|
||||
@ApiModelProperty(value = "工程标段名称")
|
||||
private String projectName;
|
||||
|
||||
/** 租赁天数 */
|
||||
@Excel(name = "租赁天数")
|
||||
@ApiModelProperty(value = "租赁天数")
|
||||
|
|
@ -101,5 +106,6 @@ public class BmAgreementInfo extends BaseEntity
|
|||
@Excel(name = "是否结算", readConverterExp = "0=,结=算中,1=已结算")
|
||||
private Long isSlt;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ package com.bonus.material.basic.service.impl;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.common.biz.constant.GlobalConstants;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -82,17 +81,13 @@ public class BmAgreementInfoServiceImpl implements IBmAgreementInfoService
|
|||
String result = format.replace("-", "");
|
||||
int num = bmAgreementInfoMapper.selectNumByMonth(nowDate);
|
||||
num = num + 1;
|
||||
String code = "";
|
||||
if (num > GlobalConstants.NUM_9 && num < GlobalConstants.NUM_100) {
|
||||
code = "XY" + result + "-00" + num;
|
||||
} else if (num > GlobalConstants.NUM_99 && num < GlobalConstants.NUM_1000) {
|
||||
code = "XY" + result + "-0" + num;
|
||||
} else {
|
||||
code = "XY" + result + "-000" + num;
|
||||
}
|
||||
return code;
|
||||
return MaterialConstants.AGREEMENT_PREFIX + result + String.format("-%04d", num);
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// System.out.println(String.format("-%05d", 555));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 修改协议管理
|
||||
*
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
purchaseInfo.setPurchaseTaxPrice(calculateTaxPrice(purchaseMaTotalPrice.get(), purchaseInfo.getTaxRate()));
|
||||
}
|
||||
if (maxStatus.isPresent() && maxStatus.getAsInt() == PurchaseTaskStatusEnum.TO_NOTICE.getStatus()) {
|
||||
purchaseInfo.setTaskStatus(PurchaseTaskStatusEnum.TASK_NOT_START.getStatus()); // 外层任务未开始
|
||||
purchaseInfo.setTaskStatus(PurchaseTaskStatusEnum.TASK_TO_START.getStatus()); // 外层任务未开始
|
||||
} else if (minStatus.isPresent() && minStatus.getAsInt() == PurchaseTaskStatusEnum.IN_STORE.getStatus()) {
|
||||
purchaseInfo.setTaskStatus(PurchaseTaskStatusEnum.TASK_FINISHED.getStatus()); // 外层任务已完成
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="signTime" column="sign_time" />
|
||||
<result property="unitId" column="unit_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="leaseDay" column="lease_day" />
|
||||
<result property="planStartTime" column="plan_start_time" />
|
||||
|
|
@ -27,34 +28,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="isSlt" column="is_slt" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBmAgreementInfoVo">
|
||||
select agreement_id, agreement_code, sign_time, unit_id, project_id, create_by, lease_day, plan_start_time, contract_code, auth_person, phone, create_time, update_by, update_time, remark, company_id, file_name, file_url, status, protocol, is_slt from bm_agreement_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBmAgreementInfoList" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" resultMap="BmAgreementInfoResult">
|
||||
<include refid="selectBmAgreementInfoVo"/>
|
||||
<where>
|
||||
<if test="agreementCode != null and agreementCode != ''"> and agreement_code = #{agreementCode}</if>
|
||||
<if test="signTime != null "> and sign_time = #{signTime}</if>
|
||||
<if test="unitId != null "> and unit_id = #{unitId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="leaseDay != null "> and lease_day = #{leaseDay}</if>
|
||||
<if test="planStartTime != null "> and plan_start_time = #{planStartTime}</if>
|
||||
<if test="contractCode != null and contractCode != ''"> and contract_code = #{contractCode}</if>
|
||||
<if test="authPerson != null and authPerson != ''"> and auth_person = #{authPerson}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
||||
<if test="isSlt != null "> and is_slt = #{isSlt}</if>
|
||||
</where>
|
||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||
bu.unit_id,bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||
FROM bm_agreement_info bai
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
||||
where bai.status = '1'
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (bai.contract_code like concat('%', #{keyWord}, '%') or
|
||||
auth_person like concat('%', #{keyWord}, '%') or
|
||||
phone like concat('%', #{keyWord}, '%'))
|
||||
</if>
|
||||
<if test="agreementCode != null and agreementCode != ''">
|
||||
and bai.agreement_code like concat('%', #{agreementCode}, '%')
|
||||
</if>
|
||||
<if test="unitId != null and unitId != ''">
|
||||
and bu.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and bp.pro_id = #{projectId}
|
||||
</if>
|
||||
ORDER BY bai.agreement_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBmAgreementInfoByAgreementId" parameterType="Long" resultMap="BmAgreementInfoResult">
|
||||
<include refid="selectBmAgreementInfoVo"/>
|
||||
where agreement_id = #{agreementId}
|
||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||
bu.unit_id,bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||
FROM bm_agreement_info bai
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
||||
where bai.status = '1' and agreement_id = #{agreementId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBmAgreementInfo" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" useGeneratedKeys="true" keyProperty="agreementId">
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getUnitData" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
/*根据标段工程id关联协议查询往来单位*/
|
||||
<if test="id != null and id != ''">
|
||||
SELECT DISTINCT bui.unit_id AS id,
|
||||
bui.unit_name AS `name`
|
||||
FROM bm_project_lot bpl
|
||||
LEFT JOIN bm_agreement_info bai ON bpl.lot_id = bai.project_id AND bai.`status` = '1'
|
||||
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id AND bui.del_flag = '0'
|
||||
SELECT DISTINCT bu.unit_id AS id,
|
||||
bu.unit_name AS `name`
|
||||
FROM bm_project bpl
|
||||
LEFT JOIN bm_agreement_info bai ON bpl.pro_id = bai.project_id AND bai.`status` = '1'
|
||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id AND bu.del_flag = '0'
|
||||
WHERE bpl.lot_id = #{id} AND bpl.del_flag = '0'
|
||||
</if>
|
||||
<if test="id == null or id == ''">
|
||||
SELECT unit_id AS id,
|
||||
unit_name AS `name`
|
||||
FROM bm_unit_info
|
||||
FROM bm_unit
|
||||
WHERE del_flag = '0'
|
||||
</if>
|
||||
</select>
|
||||
|
|
@ -29,15 +29,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="id != null and id != ''">
|
||||
SELECT DISTINCT bpl.lot_id AS id,
|
||||
bpl.lot_name AS `name`
|
||||
FROM bm_unit_info bui
|
||||
FROM bm_unit bu
|
||||
LEFT JOIN bm_agreement_info bai ON bui.unit_id = bai.unit_id AND bai.`status` = '1'
|
||||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id AND bpl.del_flag = '0'
|
||||
WHERE bui.unit_id = #{id} AND bui.del_flag = '0'
|
||||
LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id AND bpl.del_flag = '0'
|
||||
WHERE bu.unit_id = #{id} AND bu.del_flag = '0'
|
||||
</if>
|
||||
<if test="id == null or id == ''">
|
||||
SELECT lot_id AS id,
|
||||
lot_name AS `name`
|
||||
FROM bm_project_lot
|
||||
FROM bm_project
|
||||
WHERE del_flag = '0'
|
||||
</if>
|
||||
</select>
|
||||
|
|
@ -145,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getProCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||
SELECT pro_id AS id,
|
||||
pro_name AS `name`
|
||||
FROM bm_project_info
|
||||
FROM bm_project
|
||||
WHERE del_flag = '0' AND status = '0'
|
||||
ORDER BY create_time
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -458,15 +458,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select DISTINCT m.type_id, m.type_name, m.parent_id, m.unit_id, m.unit_name, m.manage_type,
|
||||
m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||
m.holding_time, m.warn_num,
|
||||
-- mtk.user_id keeperUserId,
|
||||
-- su.nick_name keeperUserName,
|
||||
mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||
m.remark,m.type_id id , m.type_name label
|
||||
m.remark,m.type_id id , m.type_name label,
|
||||
CASE m.manage_type
|
||||
WHEN 0 THEN
|
||||
IFNULL(subquery0.num, 0)
|
||||
ELSE
|
||||
IFNULL(m.storage_num, 0)
|
||||
END as storage_num
|
||||
from ma_type m
|
||||
left join ma_prop_set mps on m.type_id = mps.type_id and mps.`status`='0' and mps.del_flag='0'
|
||||
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id and mpi.`status`='0' and mpi.del_flag='0'
|
||||
-- left join ma_type_keeper mtk on m.type_id = mtk.type_id
|
||||
-- left join sys_user su on mtk.user_id = su.user_id
|
||||
left join (SELECT mt.type_id,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
count(mm.ma_id) num
|
||||
FROM ma_machine mm
|
||||
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
WHERE mm.ma_code is not null and mm.ma_status in (15)
|
||||
GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = m.type_id
|
||||
<where>
|
||||
m.del_flag = '0'
|
||||
<if test="typeName != null and typeName !=''">
|
||||
|
|
|
|||
Loading…
Reference in New Issue