|
@@ -7,6 +7,9 @@ import java.text.SimpleDateFormat;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import com.yijia.common.core.domain.model.LoginUser;
|
|
|
+import com.yijia.common.exception.CustomException;
|
|
|
+import com.yijia.common.utils.SecurityUtils;
|
|
|
import com.yijia.station.domain.PayOrder;
|
|
|
import com.yijia.station.domain.StationClassesSummary;
|
|
|
import com.yijia.station.domain.StationDeviceManage;
|
|
@@ -15,6 +18,7 @@ import com.yijia.station.service.IPayOrderService;
|
|
|
import com.yijia.station.service.IStationClassesSummaryService;
|
|
|
import com.yijia.station.service.IStationDeviceManageService;
|
|
|
import com.yijia.station.utils.FeiEPrinterUtil;
|
|
|
+import com.yijia.system.service.ISysUserService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -52,7 +56,8 @@ public class StationClassStructureController extends BaseController
|
|
|
private IStationClassesSummaryService stationClassesSummaryService;
|
|
|
@Autowired
|
|
|
private IStationDeviceManageService stationDeviceManageService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService sysUserService;
|
|
|
/**
|
|
|
* 查询班结管理列表
|
|
|
*/
|
|
@@ -60,6 +65,11 @@ public class StationClassStructureController extends BaseController
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
+ LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
+ boolean flag= sysUserService.getUserRole(currentUser);
|
|
|
+ if(!flag){
|
|
|
+ stationClassStructure.setStationId(currentUser.getUser().getDeptId());
|
|
|
+ }
|
|
|
startPage();
|
|
|
List<StationClassStructure> list = stationClassStructureService.selectStationClassStructureList(stationClassStructure);
|
|
|
return getDataTable(list);
|
|
@@ -69,6 +79,7 @@ public class StationClassStructureController extends BaseController
|
|
|
@GetMapping("/listPersonnelStructure")
|
|
|
public TableDataInfo listPersonnelStructure(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
+
|
|
|
List<StationClassStructure> list = new ArrayList<>();
|
|
|
if(stationClassStructure!=null &&stationClassStructure.getStationId()!=null ){
|
|
|
list = stationClassStructureService.listPersonnelStructure(stationClassStructure);
|
|
@@ -100,7 +111,6 @@ public class StationClassStructureController extends BaseController
|
|
|
@GetMapping("/listClass")
|
|
|
public AjaxResult listClass(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
-
|
|
|
return AjaxResult.success(stationClassStructureService.listClass(stationClassStructure));
|
|
|
}
|
|
|
/**
|
|
@@ -135,8 +145,8 @@ public class StationClassStructureController extends BaseController
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody StationClassStructure stationClassStructure) throws ParseException {
|
|
|
//获取当前班结油站
|
|
|
- // Long stationId=stationClassStructure.getStationId();
|
|
|
- Long stationId= Long.valueOf("5");
|
|
|
+ LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
+ Long stationId=currentUser.getUser().getDeptId();
|
|
|
String stationName=stationClassStructure.getStationName();
|
|
|
String username = stationClassStructure.getClassStructureMan();
|
|
|
//根据油站查询出油站是否班结过,班结过就需要查询上次班结的时间
|
|
@@ -280,7 +290,7 @@ public class StationClassStructureController extends BaseController
|
|
|
}else{
|
|
|
//初次班结 班结时间默认为当前时间,班结人username
|
|
|
PayOrder p =new PayOrder();
|
|
|
- p.setStationId(Long.valueOf("5"));
|
|
|
+ p.setStationId(stationId);
|
|
|
p.setStatus("1");
|
|
|
PayOrder orders= payOrderService.getPayOrderInfoMin(p);
|
|
|
if(orders!=null){
|
|
@@ -291,109 +301,112 @@ public class StationClassStructureController extends BaseController
|
|
|
order.setStatus("1");
|
|
|
order.setEndTime(dateFormat.format(date));
|
|
|
List<PayOrder> list = payOrderService.selectPayOrderList(order);
|
|
|
- for(PayOrder payOrder:list){
|
|
|
- StationClassStructure stationclass =new StationClassStructure();
|
|
|
- stationclass.setStationId(payOrder.getStationId());
|
|
|
- stationclass.setClassStartDate(dfe.parse(beginTime));
|
|
|
- stationclass.setStationName(payOrder.getStationName());
|
|
|
- stationclass.setClassStructureMan(username);
|
|
|
- stationclass.setClassStructureDate(date);
|
|
|
- stationclass.setClassStructureNo(no);
|
|
|
- stationclass.setOrderNo(payOrder.getOrderNo());
|
|
|
- stationclass.setOilGun(payOrder.getOilGun());
|
|
|
- stationclass.setOilName(payOrder.getOilName());
|
|
|
- if(payOrder.getOilPirce()!=null){
|
|
|
- stationclass.setOilPirce(payOrder.getOilPirce());
|
|
|
- }
|
|
|
- if(payOrder.getOilType()!=null){
|
|
|
- stationclass.setOilType(payOrder.getOilType());
|
|
|
- }
|
|
|
- stationclass.setConsumerId(payOrder.getConsumerId());
|
|
|
- stationclass.setConsumer(payOrder.getConsumer());
|
|
|
- stationclass.setAmt(payOrder.getAmt());
|
|
|
- if(payOrder.getReceivableAmt()!=null){
|
|
|
- stationclass.setReceivableAmt(payOrder.getReceivableAmt());
|
|
|
- }else{
|
|
|
- stationclass.setReceivableAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getReceivedAmt()!=null){
|
|
|
- stationclass.setReceivedAmt(payOrder.getReceivedAmt());
|
|
|
- }else{
|
|
|
- stationclass.setReceivedAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getDiscountAmt()!=null){
|
|
|
- stationclass.setDiscountAmt(payOrder.getDiscountAmt());
|
|
|
- }else{
|
|
|
- stationclass.setDiscountAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getDiscountCouponAmt()!=null){
|
|
|
- stationclass.setDiscountCouponAmt(payOrder.getDiscountCouponAmt());
|
|
|
- }else{
|
|
|
- stationclass.setDiscountCouponAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getWxAmt()!=null){
|
|
|
- stationclass.setWxAmt(payOrder.getWxAmt());
|
|
|
- }else{
|
|
|
- stationclass.setWxAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getZfbAmt()!=null){
|
|
|
- stationclass.setZfbAmt(payOrder.getZfbAmt());
|
|
|
- }else{
|
|
|
- stationclass.setZfbAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getPosAmt()!=null){
|
|
|
- stationclass.setPosAmt(payOrder.getPosAmt());
|
|
|
- }else{
|
|
|
- stationclass.setPosAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getXjAmt()!=null){
|
|
|
- stationclass.setXjAmt(payOrder.getXjAmt());
|
|
|
- }else{
|
|
|
- stationclass.setXjAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getDidiAppAmt()!=null){
|
|
|
- stationclass.setDidiAppAmt(payOrder.getDidiAppAmt());
|
|
|
- }else{
|
|
|
- stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getTyAppAmt()!=null){
|
|
|
- stationclass.setDidiAppAmt(payOrder.getTyAppAmt());
|
|
|
- }else{
|
|
|
- stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
|
|
|
+ if(list !=null && list.size()>0){
|
|
|
+ for(PayOrder payOrder:list){
|
|
|
+ StationClassStructure stationclass =new StationClassStructure();
|
|
|
+ stationclass.setStationId(payOrder.getStationId());
|
|
|
+ stationclass.setClassStartDate(dfe.parse(beginTime));
|
|
|
+ stationclass.setStationName(payOrder.getStationName());
|
|
|
+ stationclass.setClassStructureMan(username);
|
|
|
+ stationclass.setClassStructureDate(date);
|
|
|
+ stationclass.setClassStructureNo(no);
|
|
|
+ stationclass.setOrderNo(payOrder.getOrderNo());
|
|
|
+ stationclass.setOilGun(payOrder.getOilGun());
|
|
|
+ stationclass.setOilName(payOrder.getOilName());
|
|
|
+ if(payOrder.getOilPirce()!=null){
|
|
|
+ stationclass.setOilPirce(payOrder.getOilPirce());
|
|
|
+ }
|
|
|
+ if(payOrder.getOilType()!=null){
|
|
|
+ stationclass.setOilType(payOrder.getOilType());
|
|
|
+ }
|
|
|
+ stationclass.setConsumerId(payOrder.getConsumerId());
|
|
|
+ stationclass.setConsumer(payOrder.getConsumer());
|
|
|
+ stationclass.setAmt(payOrder.getAmt());
|
|
|
+ if(payOrder.getReceivableAmt()!=null){
|
|
|
+ stationclass.setReceivableAmt(payOrder.getReceivableAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setReceivableAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getReceivedAmt()!=null){
|
|
|
+ stationclass.setReceivedAmt(payOrder.getReceivedAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setReceivedAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getDiscountAmt()!=null){
|
|
|
+ stationclass.setDiscountAmt(payOrder.getDiscountAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setDiscountAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getDiscountCouponAmt()!=null){
|
|
|
+ stationclass.setDiscountCouponAmt(payOrder.getDiscountCouponAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setDiscountCouponAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getWxAmt()!=null){
|
|
|
+ stationclass.setWxAmt(payOrder.getWxAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setWxAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getZfbAmt()!=null){
|
|
|
+ stationclass.setZfbAmt(payOrder.getZfbAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setZfbAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getPosAmt()!=null){
|
|
|
+ stationclass.setPosAmt(payOrder.getPosAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setPosAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getXjAmt()!=null){
|
|
|
+ stationclass.setXjAmt(payOrder.getXjAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setXjAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getDidiAppAmt()!=null){
|
|
|
+ stationclass.setDidiAppAmt(payOrder.getDidiAppAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getTyAppAmt()!=null){
|
|
|
+ stationclass.setDidiAppAmt(payOrder.getTyAppAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setDidiAppAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getOtherAmt()!=null){
|
|
|
+ stationclass.setOtherAmt(payOrder.getOtherAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setOtherAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getDzkAmt()!=null){
|
|
|
+ stationclass.setDzkAmt(payOrder.getDzkAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setDzkAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ if(payOrder.getMemberAmt()!=null){
|
|
|
+ stationclass.setMemberAmt(payOrder.getMemberAmt());
|
|
|
+ }else{
|
|
|
+ stationclass.setMemberAmt(BigDecimal.valueOf(0));
|
|
|
+ }
|
|
|
+ stationclass.setOrderLiters(payOrder.getOrderLiters());
|
|
|
+ stationclass.setPayWay(payOrder.getPayWay());
|
|
|
+ stationclass.setPayType(payOrder.getPayType());
|
|
|
+ stationclass.setPayDate(payOrder.getPayDate());
|
|
|
+ stationclass.setOilPersonnel(payOrder.getOilPersonnel());
|
|
|
+ stationclass.setOrderType(payOrder.getOrderType());
|
|
|
+ if(payOrder.getPrintCount()!=null){
|
|
|
+ stationclass.setPrintNum(payOrder.getPrintCount());
|
|
|
+ }else{
|
|
|
+ stationclass.setPrintNum(Long.valueOf("0"));
|
|
|
+ }
|
|
|
+ i= stationClassStructureService.insertStationClassStructure(stationclass);
|
|
|
}
|
|
|
- if(payOrder.getOtherAmt()!=null){
|
|
|
- stationclass.setOtherAmt(payOrder.getOtherAmt());
|
|
|
- }else{
|
|
|
- stationclass.setOtherAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getDzkAmt()!=null){
|
|
|
- stationclass.setDzkAmt(payOrder.getDzkAmt());
|
|
|
- }else{
|
|
|
- stationclass.setDzkAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- if(payOrder.getMemberAmt()!=null){
|
|
|
- stationclass.setMemberAmt(payOrder.getMemberAmt());
|
|
|
- }else{
|
|
|
- stationclass.setMemberAmt(BigDecimal.valueOf(0));
|
|
|
- }
|
|
|
- stationclass.setOrderLiters(payOrder.getOrderLiters());
|
|
|
- stationclass.setPayWay(payOrder.getPayWay());
|
|
|
- stationclass.setPayType(payOrder.getPayType());
|
|
|
- stationclass.setPayDate(payOrder.getPayDate());
|
|
|
- stationclass.setOilPersonnel(payOrder.getOilPersonnel());
|
|
|
- stationclass.setOrderType(payOrder.getOrderType());
|
|
|
- if(payOrder.getPrintCount()!=null){
|
|
|
- stationclass.setPrintNum(payOrder.getPrintCount());
|
|
|
- }else{
|
|
|
- stationclass.setPrintNum(Long.valueOf("0"));
|
|
|
- }
|
|
|
- i= stationClassStructureService.insertStationClassStructure(stationclass);
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
StationClassStructure scs =new StationClassStructure();
|
|
|
scs.setClassStructureNo(no);
|
|
|
+ scs.setStationId(stationId);
|
|
|
//汇总班结数据将汇总的数据插入到汇总数据中
|
|
|
StationClassStructure stationclass = stationClassStructureService.selectSummyClassStructure(scs);
|
|
|
if(stationclass!=null){
|
|
@@ -427,7 +440,6 @@ public class StationClassStructureController extends BaseController
|
|
|
if(stationclass.getDiscountAmt()!=null){
|
|
|
stationClassesSummary.setDiscountAmt(stationclass.getDiscountAmt());
|
|
|
}
|
|
|
-
|
|
|
if(stationclass.getDzkAmt()!=null){
|
|
|
stationClassesSummary.setDzkAmt(stationclass.getDzkAmt());
|
|
|
}else{
|
|
@@ -438,7 +450,6 @@ public class StationClassStructureController extends BaseController
|
|
|
}else{
|
|
|
stationClassesSummary.setZfbAmt(BigDecimal.valueOf(0));
|
|
|
}
|
|
|
-
|
|
|
if(stationclass.getWxAmt()!=null){
|
|
|
stationClassesSummary.setWxAmt(stationclass.getWxAmt());
|
|
|
}else{
|
|
@@ -449,15 +460,13 @@ public class StationClassStructureController extends BaseController
|
|
|
}else{
|
|
|
stationClassesSummary.setPrintNum(Long.valueOf("0"));
|
|
|
}
|
|
|
-
|
|
|
stationClassesSummary.setClassesMan(stationclass.getClassStructureMan());
|
|
|
i=stationClassesSummaryService.insertStationClassesSummary(stationClassesSummary);
|
|
|
- }
|
|
|
- if(i==1){
|
|
|
//班结成功,打印小票
|
|
|
//查询班结小票数据
|
|
|
StationClassStructure classStructure= new StationClassStructure();
|
|
|
classStructure.setClassStructureNo(no);
|
|
|
+ classStructure.setStationId(stationId);
|
|
|
List<StationClassStructure> list= stationClassStructureService.listOilStructure(classStructure);
|
|
|
//支付方式汇总数据
|
|
|
List<StationClassStructure> paylist= stationClassStructureService.listPayStructure(classStructure);
|
|
@@ -548,11 +557,11 @@ public class StationClassStructureController extends BaseController
|
|
|
//按支付方式
|
|
|
content += "支付方式 笔 升数 金额<BR>";
|
|
|
for(StationClassStructure sc : paylist){
|
|
|
- String orderno= sc.getOrderNo();
|
|
|
+ String orderno= sc.getOrderNo();
|
|
|
orderno =addSpace(orderno,3);
|
|
|
String orderLiter="";
|
|
|
if(sc.getOrderLiters()!=null){
|
|
|
- orderLiter = sc.getOrderLiters().toString();
|
|
|
+ orderLiter = sc.getOrderLiters().toString();
|
|
|
}else{
|
|
|
sc.setOrderLiters(BigDecimal.valueOf(0));
|
|
|
orderLiter= sc.getOrderLiters().toString();
|
|
@@ -573,39 +582,24 @@ public class StationClassStructureController extends BaseController
|
|
|
content += "实际支付: "+sumAmt+" 元<BR>";
|
|
|
content += "到款金额: "+dzAmt+"元<BR>";
|
|
|
content += "班结人: "+list.get(0).getClassStructureMan()+"<BR>";
|
|
|
- }else{
|
|
|
- content += "开始时间: <BR>";
|
|
|
- content += "班结时间: <BR>";
|
|
|
- content += "油站 笔 升数 金额 <BR>";
|
|
|
+ content += "<BR>";
|
|
|
content += "--------------------------------<BR>";
|
|
|
- content += "合计 <BR>";
|
|
|
- content += " <BR>";
|
|
|
- content += "支付方式 笔 升数 金额<BR>";
|
|
|
- content += "小票张数:<BR>";
|
|
|
- content += "班结金额:<BR>";
|
|
|
- content += "优惠总额:<BR>";
|
|
|
- content += "实际支付: <BR>";
|
|
|
- content += "到款金额: <BR>";
|
|
|
- content += "班结人:<BR>";
|
|
|
- }
|
|
|
- content += "<BR>";
|
|
|
- content += "--------------------------------<BR>";
|
|
|
- content += "<BR>";
|
|
|
- //查询打印机信息
|
|
|
- Map params =new HashMap();
|
|
|
- params.put("stationId", list.get(0).getStationId());
|
|
|
- params.put("deviceType", "3");
|
|
|
- Map mp = stationDeviceManageService.getPrinterSnByStationId(params);
|
|
|
- System.out.println(mp);
|
|
|
- if(mp.containsKey("device_no") && mp.get("device_no")!= null && mp.get("device_no")!=""){
|
|
|
- String sn = mp.get("device_no").toString();
|
|
|
- FeiEPrinterUtil.printReceipt(sn, content);
|
|
|
- }else {
|
|
|
- logger.info("请正确配置打印机");
|
|
|
+ content += "<BR>";
|
|
|
+ //查询打印机信息
|
|
|
+ Map params =new HashMap();
|
|
|
+ params.put("stationId", list.get(0).getStationId());
|
|
|
+ params.put("deviceType", "3");
|
|
|
+ Map mp = stationDeviceManageService.getPrinterSnByStationId(params);
|
|
|
+ if(mp!=null&&mp.containsKey("device_no") && mp.get("device_no")!= null && mp.get("device_no")!=""){
|
|
|
+ String sn = mp.get("device_no").toString();
|
|
|
+ FeiEPrinterUtil.printReceipt(sn, content);
|
|
|
+ }else {
|
|
|
+ logger.info("请正确配置打印机");
|
|
|
+ i=2;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- return toAjax(i);
|
|
|
-
|
|
|
+ return toAjaxee(i);
|
|
|
}
|
|
|
private String addSpace(String str, int size) {
|
|
|
int len = str.length();
|
|
@@ -617,6 +611,7 @@ public class StationClassStructureController extends BaseController
|
|
|
return str;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 修改班结管理
|
|
|
*/
|
|
@@ -646,7 +641,9 @@ public class StationClassStructureController extends BaseController
|
|
|
@GetMapping("/getAgeClassStructure")
|
|
|
public AjaxResult getAgeClassStructure(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
- stationClassStructure.setStationId(Long.valueOf("5"));
|
|
|
+ //根据当前登陆人获取当前油站id
|
|
|
+ LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
+ stationClassStructure.setStationId(currentUser.getUser().getDeptId());
|
|
|
return AjaxResult.success(stationClassStructureService.selectStationClassStructureMax(stationClassStructure));
|
|
|
}
|
|
|
//初始化数据 根据员工汇总
|
|
@@ -654,10 +651,11 @@ public class StationClassStructureController extends BaseController
|
|
|
@GetMapping("/selectPersonnelStructure")
|
|
|
public TableDataInfo selectPersonnelStructure(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
+ LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
+ List<StationClassStructure> list = new ArrayList<>();
|
|
|
//根据油站查询出上次班结时间,
|
|
|
- stationClassStructure.setStationId(Long.valueOf("5"));
|
|
|
+ stationClassStructure.setStationId(currentUser.getUser().getDeptId());
|
|
|
StationClassStructure structure= stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
|
|
|
- List<StationClassStructure> list = new ArrayList<>();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
if(structure!=null){
|
|
|
PayOrder payOrder =new PayOrder();
|
|
@@ -679,7 +677,7 @@ public class StationClassStructureController extends BaseController
|
|
|
PayOrder payOrder =new PayOrder();
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setStationId(stationClassStructure.getStationId());
|
|
|
- List<PayOrder> payOrderList = payOrderService.selectPersonnelStructure(payOrder);
|
|
|
+ List<PayOrder> payOrderList= payOrderService.selectPersonnelStructure(payOrder);
|
|
|
for(PayOrder order:payOrderList){
|
|
|
StationClassStructure classStructure =new StationClassStructure();
|
|
|
classStructure.setOilPersonnel(order.getOilPersonnel());
|
|
@@ -690,6 +688,7 @@ public class StationClassStructureController extends BaseController
|
|
|
list.add(classStructure);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return getTable(list);
|
|
|
}
|
|
|
|
|
@@ -702,8 +701,9 @@ public class StationClassStructureController extends BaseController
|
|
|
@GetMapping("/selectOilStructure")
|
|
|
public TableDataInfo selectOilStructure(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
+ LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
//根据油站查询出上次班结时间,
|
|
|
- stationClassStructure.setStationId(Long.valueOf("5"));
|
|
|
+ stationClassStructure.setStationId(currentUser.getUser().getDeptId());
|
|
|
StationClassStructure structure= stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
|
|
|
List<StationClassStructure> list = new ArrayList<>();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
@@ -752,7 +752,8 @@ public class StationClassStructureController extends BaseController
|
|
|
public TableDataInfo selectPersonnelPayStructure(StationClassStructure stationClassStructure)
|
|
|
{
|
|
|
//根据油站查询出上次班结时间,
|
|
|
- stationClassStructure.setStationId(Long.valueOf("5"));
|
|
|
+ LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
+ stationClassStructure.setStationId(currentUser.getUser().getDeptId());
|
|
|
StationClassStructure structure= stationClassStructureService.selectStationClassStructureMax(stationClassStructure);
|
|
|
List<StationClassStructure> list = new ArrayList<>();
|
|
|
//根据上次班结时间,和油站去订单表中查询数据,并按照人员汇总数据
|