lisai17@sina.com 2020-10-17 02:17:53 +08:00
parent d4a44ec08c
commit 5dda71bd90
9 changed files with 40 additions and 10 deletions

View File

@ -41,6 +41,20 @@ public class PrepayDetailService extends BaseService {
}
};
public Record get(String id){
PrepayDetail pd = PrepayDetail.dao.findById(id);
if(pd == null){
return null;
}
Record out = pd.toRecord();
Customer customer = Customer.dao.findById(pd.getCustomerId());
out.set("customer_name", customer.getName());
return out;
}
public Page<Record> find(PageParam pp, Integer customer_id, String name, String stm, String etm, Integer state) {
String selectsql = "select t.*, c.name customer_name, c.address, c.texpayer_name, c.texpayer_num, c.memo, p.surplus";
String fromsql = " from prepay_detail t \n" +

View File

@ -3,6 +3,8 @@ package com.cowr.ssjygl.prepay.refunddetail;
import com.cowr.common.Const;
import com.cowr.common.base.BaseService;
import com.cowr.common.view.PageParam;
import com.cowr.model.Customer;
import com.cowr.model.PrepayDetail;
import com.cowr.model.RefundDetail;
import com.jfinal.kit.StrKit;
import com.jfinal.log.Log;
@ -23,6 +25,20 @@ public class RefundDetailService extends BaseService {
private static Log log = Log.getLog(RefundDetailService.class);
public static final RefundDetailService me = new RefundDetailService();
public Record get(String id){
RefundDetail rd = RefundDetail.dao.findById(id);
if(rd == null){
return null;
}
Record out = rd.toRecord();
Customer customer = Customer.dao.findById(rd.getCustomerId());
out.set("customer_name", customer.getName());
return out;
}
public Page<Record> find(PageParam pp, String name, String stm, String etm, Integer state) {
String selectsql = "select t.*, c.name customer_name, c.address, c.texpayer_name, c.texpayer_num, c.memo, p.surplus";
String fromsql = " from refund_detail t \n" +

View File

@ -169,6 +169,7 @@ public class InController extends Controller implements Runnable {
}
// 盐港的雷达离地磅比较远,要多等一会儿
// TODO这里的等待时间应该改成从配置文件获取
if(supermarket_id == 6){
Thread.sleep(10000);
}else{

View File

@ -250,6 +250,8 @@ public class Config extends JFinalConfig {
jdbcUrl = jdbcUrl.replace("/ssjy_xsx_dev?", "/ssjy_xsx_dev_" + configprop.get("current.supermarket_id") + "?");
}
log.debug("jdbcUrl:%s", jdbcUrl);
DruidPlugin druidPlugin = new DruidPlugin(jdbcUrl, dbprop.get("user"), dbprop.get("password").trim());
wallFilter = new WallFilter(); // 加强数据库安全
wallFilter.setDbType("mysql");

View File

@ -59,8 +59,7 @@ public class PrepayDetailController extends Controller {
*/
@Before(PrepayDetailPKValidator.class)
public void get(){
PrepayDetail model = getModel(PrepayDetail.class, "", true); // 忽略不在model中的字段
renderJson(PrepayDetailService.me.findByPk(model));
renderJson(PrepayDetailService.me.get(get("id")));
}
/**

View File

@ -54,8 +54,7 @@ public class RefundDetailController extends BaseController {
*/
@Before(RefundDetailPKValidator.class)
public void get(){
RefundDetail model = getModel(RefundDetail.class, "", true); // 忽略不在model中的字段
renderJson(RefundDetailService.me.findByPk(model));
renderJson(RefundDetailService.me.get(get("id")));
}
/**

View File

@ -15,7 +15,7 @@ socketserver.port=21002
socketio.port=12002
#当前部署本地程序的砂站id
current.supermarket_id=3
current.supermarket_id=6
#打印用到的配置信息
print.vendor=浠水县长投环保有限公司
@ -25,7 +25,8 @@ print.vendorTaxId=91421125MA49GYYK2B
#2019-08-01 暂定 50%
weight.distinguish=0.5
#最大毛重不超过 49 吨,超过 49 吨不能上高速
weigh.max=49
#2020-10-16 盐港都是小磅最大只能40
weigh.max=40
#起步运输距离
start.trans.distance=5

View File

@ -137,8 +137,7 @@ public class PrepayDetailController extends Controller {
*/
@Before(PrepayDetailPKValidator.class)
public void get(){
PrepayDetail model = getModel(PrepayDetail.class, "", true); // 忽略不在model中的字段
renderJson(PrepayDetailService.me.findByPk(model));
renderJson(PrepayDetailService.me.get(get("id")));
}
/**

View File

@ -121,8 +121,7 @@ public class RefundDetailController extends BaseController {
*/
@Before(RefundDetailPKValidator.class)
public void get(){
RefundDetail model = getModel(RefundDetail.class, "", true); // 忽略不在model中的字段
renderJson(RefundDetailService.me.findByPk(model));
renderJson(RefundDetailService.me.get(get("id")));
}
/**