|
|
@@ -185,7 +185,7 @@ public class StockServiceImpl implements StockService{
|
|
|
|
|
|
private Map<String,Object> getMainData(Integer id){
|
|
|
Map<String,Object> data = new HashMap<>();
|
|
|
- SqlRowSet rs = baseDao.getJdbcTemplate().queryForRowSet("select pi_id,pi_class,pi_inoutno,pi_whcode,pi_purpose,pi_remark from prodinout where pi_id=" + id);
|
|
|
+ SqlRowSet rs = baseDao.getJdbcTemplate().queryForRowSet("select pi_id,pi_class,pi_inoutno,pi_whcode,pi_purpose,pi_remark,wh_type,ve_add1,ve_contact,ve_tel,pi_transport from prodinout left join warehouse on pi_whcode=wh_code left join Vendor on pi_cardcode = ve_code where pi_id=" + id);
|
|
|
String piClass = null;
|
|
|
if(rs.next()){
|
|
|
piClass = rs.getString("pi_class");
|
|
|
@@ -195,6 +195,11 @@ public class StockServiceImpl implements StockService{
|
|
|
data.put("remark",rs.getString("pi_remark"));
|
|
|
data.put("order_type",getOrderType(piClass));
|
|
|
data.put("src_order_type",piClass);
|
|
|
+ data.put("warehouse_type",getWhType(rs.getString("wh_type")));
|
|
|
+ data.put("rec_type",rs.getString("pi_transport"));
|
|
|
+ data.put("rec_address",rs.getString("ve_add1"));
|
|
|
+ data.put("rec_contacts",rs.getString("ve_contact"));
|
|
|
+ data.put("rec_phone",rs.getString("ve_tel"));
|
|
|
data.put("details_list",getDetailData(id));
|
|
|
}
|
|
|
return data;
|
|
|
@@ -254,6 +259,23 @@ public class StockServiceImpl implements StockService{
|
|
|
return correctQty;
|
|
|
}
|
|
|
|
|
|
+ private int getWhType(String whtype){
|
|
|
+ int whType = -1;
|
|
|
+ switch (whtype){
|
|
|
+ case "良品仓":
|
|
|
+ whType = 1;
|
|
|
+ break;
|
|
|
+ case "不良品仓":
|
|
|
+ whType = 2;
|
|
|
+ break;
|
|
|
+ case "暂收仓":
|
|
|
+ whType = 3;
|
|
|
+ break;
|
|
|
+ default:break;
|
|
|
+ }
|
|
|
+ return whType;
|
|
|
+ }
|
|
|
+
|
|
|
private int getOrderType(String piClass){
|
|
|
int orderType = -1;
|
|
|
switch (piClass){
|