|
@@ -18,6 +18,7 @@ import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.ExpenseAllocationInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.ExpenseInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.WarehousingOrder;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseNumView;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YException;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.ExpenseInfoMapper;
|
|
@@ -31,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -305,6 +307,35 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
|
return warehousingOrderList;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 费用管理图表
|
|
|
+ * @param compId
|
|
|
+ * @param year
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<ExpenseInfo> expenseChart(String compId, int year) {
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
+ // 公司ID
|
|
|
+ pageView.put("compId", compId);
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
+ calendar.clear();
|
|
|
+ calendar.set(Calendar.YEAR, year);
|
|
|
+ Date currYearFirst = calendar.getTime();
|
|
|
+ String startDate = new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(currYearFirst);
|
|
|
+ Calendar calendar1 = Calendar.getInstance();
|
|
|
+ calendar1.clear();
|
|
|
+ calendar1.set(Calendar.YEAR, year);
|
|
|
+ calendar1.roll(Calendar.DAY_OF_YEAR, -1);
|
|
|
+ Date currYearFirst1 = calendar1.getTime();
|
|
|
+ String endDate = new SimpleDateFormat("yyyy-MM-dd 23:59:59").format(currYearFirst1);
|
|
|
+ pageView.put("startDate", startDate);
|
|
|
+ pageView.put("endDate", endDate);
|
|
|
+ List<ExpenseInfo> dataList = baseMapper.getExpenseChartListByCondition(pageView);
|
|
|
+ return dataList;
|
|
|
+ }
|
|
|
+
|
|
|
private List<String> getResourceIdList() {
|
|
|
User currentUser = AuthSecurityUtils.getCurrentUserInfo();
|
|
|
// 当前登录人主要角色
|