Commit 72168f79 by yyq1988

Merge remote-tracking branch 'origin/master'

parents a220dfb9 95997a0d
...@@ -26,6 +26,8 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> { ...@@ -26,6 +26,8 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> {
// private String receiver; // 领用人 // private String receiver; // 领用人
private Office office; // 领用机构 private Office office; // 领用机构
private Date time; // 领用时间 private Date time; // 领用时间
private Date beginOutboundTime; // 开始 领用时间
private Date endOutboundTime; // 结束 领用时间
private List<MaterialRequisitionInfo> materialRequisitionInfoList = Lists.newArrayList(); // 子表列表 private List<MaterialRequisitionInfo> materialRequisitionInfoList = Lists.newArrayList(); // 子表列表
public MaterialRequisition() { public MaterialRequisition() {
...@@ -73,7 +75,23 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> { ...@@ -73,7 +75,23 @@ public class MaterialRequisition extends DataEntity<MaterialRequisition> {
public void setTime(Date time) { public void setTime(Date time) {
this.time = time; this.time = time;
} }
public Date getBeginOutboundTime() {
return beginOutboundTime;
}
public void setBeginOutboundTime(Date beginOutboundTime) {
this.beginOutboundTime = beginOutboundTime;
}
public Date getEndOutboundTime() {
return endOutboundTime;
}
public void setEndOutboundTime(Date endOutboundTime) {
this.endOutboundTime = endOutboundTime;
}
public List<MaterialRequisitionInfo> getMaterialRequisitionInfoList() { public List<MaterialRequisitionInfo> getMaterialRequisitionInfoList() {
return materialRequisitionInfoList; return materialRequisitionInfoList;
} }
......
...@@ -6,18 +6,24 @@ ...@@ -6,18 +6,24 @@
a.id AS "id", a.id AS "id",
a.material_requisition_id AS "materialRequisition.id", a.material_requisition_id AS "materialRequisition.id",
a.ledger_info_id AS "ledgerInfo.id", a.ledger_info_id AS "ledgerInfo.id",
a.receiver AS "receiver.id",
a.create_by AS "createBy.id", a.create_by AS "createBy.id",
a.create_date AS "createDate", a.create_date AS "createDate",
a.update_by AS "updateBy.id", a.update_by AS "updateBy.id",
a.update_date AS "updateDate", a.update_date AS "updateDate",
a.remarks AS "remarks",
a.del_flag AS "delFlag", a.del_flag AS "delFlag",
ledgerInfo.name AS "ledgerInfo.name",
ledgerInfo.code AS "ledgerInfo.code",
ledgerInfo.type_id AS "ledgerInfo.typeId",
ledgerInfo.model AS "ledgerInfo.model",
ledgerInfo.amount AS "ledgerInfo.amount",
a.remarks AS "remarks",
a.receiver AS "receiver.id",
receiver.name AS "receiver.name" receiver.name AS "receiver.name"
</sql> </sql>
<sql id="materialRequisitionInfoJoins"> <sql id="materialRequisitionInfoJoins">
LEFT JOIN sys_user receiver ON receiver.id = a.receiver LEFT JOIN sys_user receiver ON receiver.id = a.receiver
LEFT JOIN t_wh_ledger_info ledgerInfo ON ledgerInfo.id = a.ledger_info_id
</sql> </sql>
......
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
<if test="operator != null and operator.id != null and operator.id != ''"> <if test="operator != null and operator.id != null and operator.id != ''">
AND a.operator = #{operator.id} AND a.operator = #{operator.id}
</if> </if>
<if test="beginOutboundTime != null and endOutboundTime != null ">
AND a.time BETWEEN #{beginOutboundTime} AND #{endOutboundTime}
</if>
<if test="office != null and office.id != null and office.id != ''">
AND a.collecting_office_id = #{office.id}
</if>
</where> </where>
<choose> <choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''"> <when test="page !=null and page.orderBy != null and page.orderBy != ''">
......
...@@ -261,21 +261,5 @@ public class MaterialRequisitionController extends BaseController { ...@@ -261,21 +261,5 @@ public class MaterialRequisitionController extends BaseController {
return j; return j;
} }
/**
* 获取 领用机构下的 所有用户
*/
@ResponseBody
@RequestMapping(value = "getUserListByOfficeId")
public List<User> getUserListByOfficeId(String officeId) throws Exception{
/**
* 后台hibernate-validation插件校验
*/
List<User> list = new ArrayList<>();
if (StringUtils.isBlank(officeId)){
return list;
}
list = systemService.findUserByOfficeId(officeId);
return list;
}
} }
\ No newline at end of file
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
a.update_by AS "updateBy.id", a.update_by AS "updateBy.id",
a.update_date AS "updateDate", a.update_date AS "updateDate",
a.remarks AS "remarks", a.remarks AS "remarks",
ledgerInfo.name AS "ledgerInfo.name",
ledgerInfo.code AS "ledgerInfo.code",
ledgerInfo.type_id AS "ledgerInfo.typeId",
ledgerInfo.model AS "ledgerInfo.model",
ledgerInfo.amount AS "ledgerInfo.amount",
a.del_flag AS "delFlag" a.del_flag AS "delFlag"
</sql> </sql>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
package com.jeeplus.modules.warehouse.profitwarehousing.entity; package com.jeeplus.modules.warehouse.profitwarehousing.entity;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List; import java.util.List;
...@@ -10,6 +11,7 @@ import com.google.common.collect.Lists; ...@@ -10,6 +11,7 @@ import com.google.common.collect.Lists;
import com.jeeplus.core.persistence.DataEntity; import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField; import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.sys.entity.User;
/** /**
* 盘盈入库单Entity * 盘盈入库单Entity
...@@ -20,10 +22,11 @@ public class ProfitWarehousing extends DataEntity<ProfitWarehousing> { ...@@ -20,10 +22,11 @@ public class ProfitWarehousing extends DataEntity<ProfitWarehousing> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String number; // 盘盈入库单号 private String number; // 盘盈入库单号
private String operator; // 操作人 private User operator; // 操作人
private Date time; // 时间 private Date time; // 时间
private Date beginTime; // 开始 时间 private Date beginTime; // 开始 时间
private Date endTime; // 结束 时间 private Date endTime; // 结束 时间
private BigDecimal sum; // 总价
private List<ProfitWarehousingInfo> profitWarehousingInfoList = Lists.newArrayList(); // 子表列表 private List<ProfitWarehousingInfo> profitWarehousingInfoList = Lists.newArrayList(); // 子表列表
public ProfitWarehousing() { public ProfitWarehousing() {
...@@ -44,11 +47,11 @@ public class ProfitWarehousing extends DataEntity<ProfitWarehousing> { ...@@ -44,11 +47,11 @@ public class ProfitWarehousing extends DataEntity<ProfitWarehousing> {
} }
@ExcelField(title="操作人", align=2, sort=2) @ExcelField(title="操作人", align=2, sort=2)
public String getOperator() { public User getOperator() {
return operator; return operator;
} }
public void setOperator(String operator) { public void setOperator(User operator) {
this.operator = operator; this.operator = operator;
} }
...@@ -57,6 +60,14 @@ public class ProfitWarehousing extends DataEntity<ProfitWarehousing> { ...@@ -57,6 +60,14 @@ public class ProfitWarehousing extends DataEntity<ProfitWarehousing> {
public Date getTime() { public Date getTime() {
return time; return time;
} }
@ExcelField(title="总价", align=2, sort=4)
public BigDecimal getSum() {
return sum;
}
public void setSum(BigDecimal sum) {
this.sum = sum;
}
public void setTime(Date time) { public void setTime(Date time) {
this.time = time; this.time = time;
......
...@@ -3,10 +3,17 @@ ...@@ -3,10 +3,17 @@
*/ */
package com.jeeplus.modules.warehouse.profitwarehousing.entity; package com.jeeplus.modules.warehouse.profitwarehousing.entity;
import com.jeeplus.modules.warehouse.materialtype.entity.MaterialType;
import com.jeeplus.modules.warehouse.outbound.entity.Outbound;
import com.jeeplus.modules.warehouse.qrcode.entity.QrCode;
import com.jeeplus.modules.warehouse.shelves.entity.Shelves; import com.jeeplus.modules.warehouse.shelves.entity.Shelves;
import com.jeeplus.core.persistence.DataEntity; import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField; import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.warehouse.storage.entity.Storage;
import com.jeeplus.modules.warehouse.warehouse.entity.Warehouse;
import java.math.BigDecimal;
/** /**
* 盘盈入库单明细表Entity * 盘盈入库单明细表Entity
...@@ -18,10 +25,18 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> { ...@@ -18,10 +25,18 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private ProfitWarehousing profitWarehousing; // 盘盈入库主表ID private ProfitWarehousing profitWarehousing; // 盘盈入库主表ID
private String name; // 名称 private String name; // 名称
private String type; // 类型 private MaterialType type; // 类型
private String marking; // 型号 private String marking; // 型号
private Shelves shelves; // 货架ID private Shelves shelves; // 货架ID
private Warehouse warehouse; // 仓库外键
private BigDecimal amount; // 单价
private QrCode qrCode; // 前端保存入库单时使用的临时二维码对象
public ProfitWarehousingInfo(String id, ProfitWarehousing profitWarehousing) {
super(id);
this.profitWarehousing = profitWarehousing;
}
public ProfitWarehousingInfo() { public ProfitWarehousingInfo() {
super(); super();
} }
...@@ -53,11 +68,11 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> { ...@@ -53,11 +68,11 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
} }
@ExcelField(title="类型", align=2, sort=3) @ExcelField(title="类型", align=2, sort=3)
public String getType() { public MaterialType getType() {
return type; return type;
} }
public void setType(String type) { public void setType(MaterialType type) {
this.type = type; this.type = type;
} }
...@@ -78,5 +93,28 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> { ...@@ -78,5 +93,28 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
public void setShelves(Shelves shelves) { public void setShelves(Shelves shelves) {
this.shelves = shelves; this.shelves = shelves;
} }
public Warehouse getWarehouse() {
return warehouse;
}
public void setWarehouse(Warehouse warehouse) {
this.warehouse = warehouse;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public QrCode getQrCode() {
return qrCode;
}
public void setQrCode(QrCode qrCode) {
this.qrCode = qrCode;
}
} }
\ No newline at end of file
...@@ -6,9 +6,13 @@ ...@@ -6,9 +6,13 @@
a.id AS "id", a.id AS "id",
a.profit_warehousing_id AS "profitWarehousing.id", a.profit_warehousing_id AS "profitWarehousing.id",
a.name AS "name", a.name AS "name",
a.type AS "type", a.type AS "type.id",
a.marking AS "marking", a.marking AS "marking",
a.shelves_id AS "shelves.id", a.shelves_id AS "shelves.id",
a.warehouse_id AS "warehouse.id",
warehouse.name AS "warehouse.name",
a.qr_id AS "qrCode.id",
a.amount AS "amount",
a.create_by AS "createBy.id", a.create_by AS "createBy.id",
a.create_date AS "createDate", a.create_date AS "createDate",
a.update_by AS "updateBy.id", a.update_by AS "updateBy.id",
...@@ -18,7 +22,8 @@ ...@@ -18,7 +22,8 @@
</sql> </sql>
<sql id="profitWarehousingInfoJoins"> <sql id="profitWarehousingInfoJoins">
LEFT JOIN t_wh_material_type type ON type.id = a.type
LEFT JOIN t_wh_warehouse warehouse ON warehouse.id = a.warehouse_id
</sql> </sql>
...@@ -79,6 +84,9 @@ ...@@ -79,6 +84,9 @@
type, type,
marking, marking,
shelves_id, shelves_id,
warehouse_id,
qr_id,
amount,
create_by, create_by,
create_date, create_date,
update_by, update_by,
...@@ -89,9 +97,12 @@ ...@@ -89,9 +97,12 @@
#{id}, #{id},
#{profitWarehousing.id}, #{profitWarehousing.id},
#{name}, #{name},
#{type}, #{type.id},
#{marking}, #{marking},
#{shelves.id}, #{shelves.id},
#{warehouse.id},
#{qrCode.id},
#{amount},
#{createBy.id}, #{createBy.id},
#{createDate}, #{createDate},
#{updateBy.id}, #{updateBy.id},
...@@ -108,6 +119,9 @@ ...@@ -108,6 +119,9 @@
type = #{type}, type = #{type},
marking = #{marking}, marking = #{marking},
shelves_id = #{shelves.id}, shelves_id = #{shelves.id},
qr_id = #{qrCode.id},
warehouse_id = #{warehouse.id},
amount = #{amount},
update_by = #{updateBy.id}, update_by = #{updateBy.id},
update_date = #{updateDate}, update_date = #{updateDate},
remarks = #{remarks} remarks = #{remarks}
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<sql id="profitWarehousingColumns"> <sql id="profitWarehousingColumns">
a.id AS "id", a.id AS "id",
a.number AS "number", a.number AS "number",
a.operator AS "operator", a.operator AS "operator.id",
a.time AS "time", a.time AS "time",
a.sum AS "sum",
a.create_by AS "createBy.id", a.create_by AS "createBy.id",
a.create_date AS "createDate", a.create_date AS "createDate",
a.update_by AS "updateBy.id", a.update_by AS "updateBy.id",
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
</sql> </sql>
<sql id="profitWarehousingJoins"> <sql id="profitWarehousingJoins">
LEFT JOIN sys_user operator ON operator.id = a.operator
</sql> </sql>
...@@ -78,6 +79,7 @@ ...@@ -78,6 +79,7 @@
number, number,
operator, operator,
time, time,
sum,
create_by, create_by,
create_date, create_date,
update_by, update_by,
...@@ -87,8 +89,9 @@ ...@@ -87,8 +89,9 @@
) VALUES ( ) VALUES (
#{id}, #{id},
#{number}, #{number},
#{operator}, #{operator.id},
#{time}, #{time},
#{sum},
#{createBy.id}, #{createBy.id},
#{createDate}, #{createDate},
#{updateBy.id}, #{updateBy.id},
...@@ -101,8 +104,9 @@ ...@@ -101,8 +104,9 @@
<update id="update"> <update id="update">
UPDATE t_wh_profit_warehousing SET UPDATE t_wh_profit_warehousing SET
number = #{number}, number = #{number},
operator = #{operator}, operator = #{operator.id},
time = #{time}, time = #{time},
sum = #{sum},
update_by = #{updateBy.id}, update_by = #{updateBy.id},
update_date = #{updateDate}, update_date = #{updateDate},
remarks = #{remarks} remarks = #{remarks}
......
...@@ -51,18 +51,18 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe ...@@ -51,18 +51,18 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
} }
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void save(ProfitWarehousing profitWarehousing) { public void save(ProfitWarehousing profitWarehousing) {
profitWarehousing.setNumber(createPYDH());
super.save(profitWarehousing); super.save(profitWarehousing);
for (ProfitWarehousingInfo profitWarehousingInfo : profitWarehousing.getProfitWarehousingInfoList()){ for (ProfitWarehousingInfo profitWarehousingInfo : profitWarehousing.getProfitWarehousingInfoList()){
profitWarehousingInfo.setProfitWarehousing(profitWarehousing);
if (profitWarehousingInfo.getId() == null){ if (profitWarehousingInfo.getId() == null){
continue; continue;
} }
if (ProfitWarehousingInfo.DEL_FLAG_NORMAL.equals(profitWarehousingInfo.getDelFlag())){ if (ProfitWarehousingInfo.DEL_FLAG_NORMAL.equals(profitWarehousingInfo.getDelFlag())){
if (StringUtils.isBlank(profitWarehousingInfo.getId())){ if (StringUtils.isBlank(profitWarehousingInfo.getId())){
profitWarehousingInfo.setProfitWarehousing(profitWarehousing);
profitWarehousingInfo.preInsert(); profitWarehousingInfo.preInsert();
profitWarehousingInfoMapper.insert(profitWarehousingInfo); profitWarehousingInfoMapper.insert(profitWarehousingInfo);
}else{ }else{
profitWarehousingInfo.setProfitWarehousing(profitWarehousing);
profitWarehousingInfo.preUpdate(); profitWarehousingInfo.preUpdate();
profitWarehousingInfoMapper.update(profitWarehousingInfo); profitWarehousingInfoMapper.update(profitWarehousingInfo);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment