领料出库接口
This commit is contained in:
parent
f42e2210ba
commit
518bb466e6
|
|
@ -25,9 +25,25 @@ public class LeaseOutDetails implements Serializable {
|
|||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
/** 父级ID */
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
private Integer parentId;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Integer parentId;
|
||||
private Integer taskId;
|
||||
|
||||
/** 任务编码 */
|
||||
@ApiModelProperty(value = "任务编码")
|
||||
private String code;
|
||||
|
||||
/** 单位名称 */
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
/** 工程名称 */
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String proName;
|
||||
|
||||
/** 规格ID */
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
|
|
@ -49,8 +65,16 @@ public class LeaseOutDetails implements Serializable {
|
|||
@ApiModelProperty(value = "协议ID")
|
||||
private String agreementId;
|
||||
|
||||
/** 预领料数 */
|
||||
@ApiModelProperty(value = "预领料数")
|
||||
/** 预领数量 */
|
||||
@ApiModelProperty(value = "预领数量")
|
||||
private Double preNum;
|
||||
|
||||
/** 审批数量 */
|
||||
@ApiModelProperty(value = "审批数量")
|
||||
private Double auditNum;
|
||||
|
||||
/** 出库数量 */
|
||||
@ApiModelProperty(value = "出库数量")
|
||||
private Double outNum;
|
||||
|
||||
/** 出库类型 */
|
||||
|
|
@ -78,7 +102,9 @@ public class LeaseOutDetails implements Serializable {
|
|||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 车牌号 */
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String carCode;
|
||||
|
||||
/** 数据所属组织 */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import java.util.regex.Pattern;
|
|||
*/
|
||||
public class StringHelper {
|
||||
|
||||
private static String hexString = "0123456789ABCDEF";
|
||||
private static final String hexString = "0123456789ABCDEF";
|
||||
|
||||
public static String replaceAll(String str, String oldStr, String newStr) {
|
||||
return str.replaceAll(oldStr, newStr);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.app.controller;
|
||||
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyInfo;
|
||||
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||
|
|
@ -11,7 +10,6 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
|||
import com.bonus.sgzb.common.log.annotation.Log;
|
||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -37,6 +35,12 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
return getDataTable(leaseOutDetailsService.selectListByParentId(taskId));
|
||||
}
|
||||
|
||||
@Log(title = "领料出库列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping("/getLeaseOutRecordList")
|
||||
public TableDataInfo getLeaseList(@RequestBody LeaseOutDetails record) {
|
||||
return getDataTable(leaseOutDetailsService.leaseOutRecordList(record));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.app.mapper;
|
||||
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||
|
|
@ -24,6 +23,13 @@ public interface LeaseOutDetailsMapper {
|
|||
/** 查询出库详情 */
|
||||
List<LeaseOutDetails> selectListByParentId(String parentId);
|
||||
|
||||
/**
|
||||
* 领料出库列表
|
||||
* @param bean 参数
|
||||
* @return 列表
|
||||
*/
|
||||
List<LeaseOutDetails> leaseOutRecordList(LeaseOutDetails bean);
|
||||
|
||||
/**
|
||||
* 修改 (lease_apply_details 领料任务详细表)的已领数量
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.app.service;
|
||||
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -24,6 +23,13 @@ public interface LeaseOutDetailsService {
|
|||
*/
|
||||
List<LeaseOutDetails> selectListByParentId(String parentId);
|
||||
|
||||
/**
|
||||
* 领料出库列表
|
||||
* @param bean 参数
|
||||
* @return 列表
|
||||
*/
|
||||
List<LeaseOutDetails> leaseOutRecordList(LeaseOutDetails bean);
|
||||
|
||||
int bindMachineByRfid(MaMachine maMachine);
|
||||
int bindMachineByQrCode(MaMachine maMachine);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,17 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
return leaseOutDetailsMapper.selectListByParentId(parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库列表
|
||||
*
|
||||
* @param bean 参数
|
||||
* @return 列表
|
||||
*/
|
||||
@Override
|
||||
public List<LeaseOutDetails> leaseOutRecordList(LeaseOutDetails bean) {
|
||||
return leaseOutDetailsMapper.leaseOutRecordList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int bindMachineByRfid(MaMachine maMachine) {
|
||||
|
|
|
|||
|
|
@ -349,4 +349,39 @@
|
|||
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>
|
||||
|
||||
<select id="leaseOutRecordList" resultType="com.bonus.sgzb.base.api.domain.LeaseOutDetails">
|
||||
SELECT
|
||||
tt.task_id,
|
||||
tt.task_status,
|
||||
tt.`code`,
|
||||
tt.create_time,
|
||||
bui.unit_name AS unitName,
|
||||
bpl.lot_name AS proName,
|
||||
COALESCE(SUM(lad.pre_num), 0) AS preNum,
|
||||
COALESCE(SUM(lad.al_num), 0) AS outNum
|
||||
FROM
|
||||
tm_task tt
|
||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = tt.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||
LEFT JOIN lease_apply_info lai ON lai.task_id = tt.task_id
|
||||
LEFT JOIN lease_apply_details lad ON lad.parennt_id = lai.id AND lad.pre_num IS NOT NULL
|
||||
WHERE
|
||||
tt.task_type = '29'
|
||||
AND tt.`status` = '1'
|
||||
AND tt.task_status IN ('33', '34', '35')
|
||||
<if test="code != null and code != ''">
|
||||
AND tt.`code` like concat('%', #{code}, '%')
|
||||
</if>
|
||||
<if test="proName != null and proName != ''">
|
||||
AND bpl.lot_name like concat('%', #{proName}, '%')
|
||||
</if>
|
||||
<if test="unitName != null and unitName != ''">
|
||||
AND bui.unit_name like concat('%', #{unitName}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
tt.task_id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue